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.
This commit is contained in:
Benno Schulenberg 2020-03-16 08:55:11 +01:00
parent 3d8cd65b1b
commit 56308b3256

View File

@ -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++;
}