commit c20134c20d26106b2f59248f7fd1afd0ca42c553
parent 56308b32566b51d9d88230b62743a83f24d9259a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 16 Mar 2020 10:15:01 +0100
tweaks: rename a variable, away from a single letter
Diffstat:
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2284,9 +2284,9 @@ void warn_and_shortly_pause(const char *msg)
* of the bottom portion of the window. */
void bottombars(int menu)
{
- size_t number, itemwidth, i;
- funcstruct *f;
+ size_t index, number, itemwidth;
const keystruct *s;
+ funcstruct *f;
/* Set the global variable to the given menu. */
currmenu = menu;
@@ -2308,19 +2308,20 @@ void bottombars(int menu)
/* Display the first number of shortcuts in the given menu that
* have a key combination assigned to them. */
- for (f = allfuncs, i = 0; i < number && f != NULL; f = f->next) {
+ for (f = allfuncs, index = 0; f != NULL && index < number; f = f->next) {
if ((f->menus & menu) == 0)
continue;
s = first_sc_for(menu, f->func);
+
if (s == NULL)
continue;
- wmove(bottomwin, 1 + i % 2, (i / 2) * itemwidth);
+ wmove(bottomwin, 1 + index % 2, (index / 2) * itemwidth);
post_one_key(s->keystr, _(f->desc), itemwidth +
- ((i < number - 2) ? 0 : COLS % itemwidth));
- i++;
+ ((index < number - 2) ? 0 : COLS % itemwidth));
+ index++;
}
/* Defeat a VTE bug by homing the cursor and forcing a screen update. */