diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-30 15:26:33 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-30 15:26:33 -0300 |
commit | 58836f3c2020c634a2a508846140d163572fd5c0 (patch) | |
tree | 13a52943928f65a506201f06199dba1e403a7a93 /Screen.hs | |
parent | 4010acf611b862be18e4a5fc8964f38c7767e5f2 (diff) |
Fix problem with multi-lines subjects
Diffstat (limited to 'Screen.hs')
-rw-r--r-- | Screen.hs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |