tweaks: reshuffle a fragment of code, for clarity
parent
29276d1d3a
commit
9da23799ff
10
src/winio.c
10
src/winio.c
|
@ -2228,12 +2228,16 @@ void bottombars(int menu)
|
||||||
|
|
||||||
wmove(bottomwin, 1 + index % 2, (index / 2) * itemwidth);
|
wmove(bottomwin, 1 + index % 2, (index / 2) * itemwidth);
|
||||||
|
|
||||||
/* When the number is uneven, the penultimate item can be extra wide. */
|
/* When the number is uneven, the penultimate item can be double wide. */
|
||||||
if ((number % 2) == 1 && (index + 2 == number))
|
if ((number % 2) == 1 && (index + 2 == number))
|
||||||
thiswidth += itemwidth;
|
thiswidth += itemwidth;
|
||||||
|
|
||||||
post_one_key(s->keystr, _(f->desc), thiswidth +
|
/* For the last two items, use also the remaining slack. */
|
||||||
((index < number - 2) ? 0 : COLS % itemwidth));
|
if (index + 2 >= number)
|
||||||
|
thiswidth += COLS % itemwidth;
|
||||||
|
|
||||||
|
post_one_key(s->keystr, _(f->desc), thiswidth);
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue