From 58836f3c2020c634a2a508846140d163572fd5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Fri, 30 Aug 2013 15:26:33 -0300 Subject: Fix problem with multi-lines subjects --- Screen.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Screen.hs') 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 -- cgit v1.2.3