commit 56308b32566b51d9d88230b62743a83f24d9259a
parent 3d8cd65b1b16ae121c8c875aaadd9e3d7ee28ed3
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 16 Mar 2020 08:55:11 +0100
display: keep the help items aligned, by not writing too many characters
Only for the last item at the end of each of the two help lines there
are sometimes a few extra columns available. Do not use these extra
columns also for the other help items, because apparently, when wmove()
lands in the second column of a double-width character, it does not
wipe out this character (replacing it with a space) but goes to the
next column instead, causing a misalignment of the text.
This fixes https://savannah.gnu.org/bugs/?57994.
Bug existed since version 1.3.12, commit e806ab84.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2318,7 +2318,8 @@ void bottombars(int menu)
wmove(bottomwin, 1 + i % 2, (i / 2) * itemwidth);
- post_one_key(s->keystr, _(f->desc), itemwidth + (COLS % itemwidth));
+ post_one_key(s->keystr, _(f->desc), itemwidth +
+ ((i < number - 2) ? 0 : COLS % itemwidth));
i++;
}