summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-08-27 19:37:10 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-08-27 19:37:10 +0000
commit31beda39930d293e1331505d138ad5fae7bdbc4f (patch)
tree0d7272b0159c0acc7ef3caf7b631a8427724926d /lib.c
parentb6a56b307a101a1ed78cf1a644ec32a27a509d29 (diff)
[patch-0.94.4i.gt.arrowcursor.1] Padding to the end of
line/right jusitifying does not work in menus when $arrow_cursor is set, because the extra space needed for the arrow is not taken into account. (From Gero Treuner <gero@faveve.uni-stuttgart.de>)
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index c5bb3e39..45d901d3 100644
--- a/lib.c
+++ b/lib.c
@@ -885,9 +885,11 @@ void mutt_FormatString (char *dest, /* output buffer */
{
char prefix[SHORT_STRING], buf[LONG_STRING], *cp, *wptr = dest, ch;
char ifstring[SHORT_STRING], elsestring[SHORT_STRING];
- size_t wlen = 0, count, len;
+ size_t wlen, count, len;
destlen--; /* save room for the terminal \0 */
+ wlen = (flags & M_FORMAT_ARROWCURSOR && option (OPTARROWCURSOR)) ? 3 : 0;
+
while (*src && wlen < destlen)
{
if (*src == '%')