From 99150505a635c8e9022a8de79041b14e7994dac9 Mon Sep 17 00:00:00 2001 From: ak1 Date: Sun, 27 Feb 2005 16:02:55 +0000 Subject: [PATCH] Andreas Krennmair: fix status_line drawing with sidebar enabled. git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@103 e385b8ad-14ed-0310-8656-cc95a2468c6d --- ChangeLog.mutt-ng | 7 ++----- muttlib.c | 4 ++-- pager.c | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mutt-ng b/ChangeLog.mutt-ng index c0181c2..cc3428a 100644 --- a/ChangeLog.mutt-ng +++ b/ChangeLog.mutt-ng @@ -1,12 +1,9 @@ Changes specific to mutt-ng: -2005-02-27 +2005-02-27: + * integrated patch to highlight the next mailbox which includes new mail in sidebar * makes sidebar fit into screen in the pager -2005-02-27 - * integrated patch to highlight the next mailbox which includes new mail in - sidebar - 2005-02-24: * Integrated another sidebar fix and a build fix from Rocco Rutte. * Implemented feature request that the number of flagged messages is shown in the sidebar diff --git a/muttlib.c b/muttlib.c index b7bba57..b01619f 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1026,10 +1026,10 @@ void mutt_FormatString (char *dest, /* output buffer */ ch = *src++; /* pad char */ /* calculate space left on line. if we've already written more data than will fit on the line, ignore the rest of the line */ - if ( DrawFullLine ) + if ( DrawFullLine || option(OPTSTATUSONTOP)) count = (COLS < destlen ? COLS : destlen); else - count = ((COLS) < destlen ? (COLS) : destlen); + count = ((COLS-SidebarWidth) < destlen ? (COLS - SidebarWidth) : destlen); if (count > col) { count -= col; /* how many columns left on this line */ diff --git a/pager.c b/pager.c index 312e8e1..95d1f08 100644 --- a/pager.c +++ b/pager.c @@ -1776,9 +1776,9 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) draw_sidebar(MENU_PAGER); /* print out the index status bar */ menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); - move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),0); + move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),option(OPTSTATUSONTOP)?0:SidebarWidth); SETCOLOR (MT_COLOR_STATUS); - mutt_paddstr (COLS, buffer); + mutt_paddstr (COLS-(option(OPTSTATUSONTOP)?0:SidebarWidth), buffer); SETCOLOR (MT_COLOR_NORMAL); } /* if we're not using the index, update every time */ -- 2.20.1