aboutsummaryrefslogtreecommitdiff
path: root/Screen.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-08-30 15:26:33 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-08-30 15:26:33 -0300
commit58836f3c2020c634a2a508846140d163572fd5c0 (patch)
tree13a52943928f65a506201f06199dba1e403a7a93 /Screen.hs
parent4010acf611b862be18e4a5fc8964f38c7767e5f2 (diff)
Fix problem with multi-lines subjects
Diffstat (limited to 'Screen.hs')
-rw-r--r--Screen.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Screen.hs b/Screen.hs
index 52cdfe2..4e16b22 100644
--- a/Screen.hs
+++ b/Screen.hs
@@ -152,11 +152,11 @@ drawEmailHeader = do
let row = curRowAsInteger st
setColor $ headerColorID . colorStyle $ st
moveCursor row (colPadAsInteger st)
- drawString $ ("From: " ++) $ cropWith "From: " . ppNameAddr . getFrom $ fs
+ drawCroppedString st $ ("From: " ++) $ ppNameAddr . getFrom $ fs
moveCursor (row + 1) (colPadAsInteger st)
- drawString $ ("To: " ++) $ cropWith "To: " . ppNameAddr . getTo $ fs
+ drawCroppedString st $ ("To: " ++) $ ppNameAddr . getTo $ fs
moveCursor (row + 2) (colPadAsInteger st)
- drawString $ ("Subject: " ++) $ cropWith "Subject: " . ppSubject . getSubject $ fs
+ drawCroppedString st $ ("Subject: " ++) $ ppSubject . getSubject $ fs
setColor $ baseColorID . colorStyle $ st
put $ st { currentRow = (4 + currentRow st) }
@@ -235,6 +235,7 @@ resetScrollBuffer = do
scrollBufferIn = EH.scrollCrop 0 (screenRows st) $ selectedEmails . indexState $ st }
put st { indexState = ist }
+drawCroppedString st str = drawString $ normalizeLen (screenColumns st) str
-- The type system complains if I want to use the same function for diferents monads
liftCurses = lift . lift
nihil fit ex nihilo