<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2087: "%>" in pager_format overshoots by 10 repetitions



The following reply was made to PR mutt/2087; it has been noted by GNATS.

From: TAKAHASHI Tamotsu <ttakah@xxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2087: "%>" in pager_format overshoots by 10 repetitions
Date: Mon, 26 Sep 2005 20:05:49 +0900

 > >Number:         2087
 > >Notify-List:    259145@xxxxxxxxxxxxxxx
 > >Category:       mutt
 > >Synopsis:       "%>" in pager_format overshoots by 10 repetitions
 
 > A construction like "%>-" in pager_format should make the rest of the
 > pager status line flush right against " -- (63%) ". Instead, "%>-" in
 > pager_format fails to take the width of " -- (63%) " (that is, 10)
 > into account.  Hence the last 10 characters of the pager status line
 > gets cut off.  A current workaround is to append ten characters to my
 > pager_format setting.
 
 mutt_FormatString (in muttlib.c) uses COLS directly
 (i.e. not as an argument).
 
 We can either
 (1) write the precise behaviour of "%>X" in the manual,
 (2) create another %-expando to be translated to "63%", or
 (3) add a flag or a number argument to _mutt_make_string
 (in hdrline.c) and mutt_FormatString (in muttlib.c).
 
 #1 is the easiest.
 
 #2 is the most clean in design viewpoint, IMO. The less
 hardcoded strings, the better. I don't want the percentage
 to be shown on some small screens. But this will be an
 incompatibility.
 
 #3 is ugly. But I'm going to upload a patch of this fix.
 
 -- 
 tamo