commit 8b3213cadb21b6758c7909341dd2425c92144e01
parent 14c5f03e389c3a5ee469a6a58faadb91b305aa89
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 15 Jul 2017 11:49:56 +0200
tweaks: chuck some debugging stuff
Diffstat:
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2226,37 +2226,23 @@ void bottombars(int menu)
blank_bottombars();
-#ifdef DEBUG
- fprintf(stderr, "In bottombars, number of items == \"%d\"\n", (int) number);
-#endif
-
+ /* 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) {
-#ifdef DEBUG
- fprintf(stderr, "Checking menu items....");
-#endif
if ((f->menus & menu) == 0)
continue;
-#ifdef DEBUG
- fprintf(stderr, "found one! f->menus = %x, desc = \"%s\"\n", f->menus, f->desc);
-#endif
s = first_sc_for(menu, f->scfunc);
- if (s == NULL) {
-#ifdef DEBUG
- fprintf(stderr, "Whoops, guess not, no shortcut key found for func!\n");
-#endif
+ if (s == NULL)
continue;
- }
wmove(bottomwin, 1 + i % 2, (i / 2) * itemwidth);
-#ifdef DEBUG
- fprintf(stderr, "Calling onekey with keystr \"%s\" and desc \"%s\"\n", s->keystr, f->desc);
-#endif
+
onekey(s->keystr, _(f->desc), itemwidth + (COLS % itemwidth));
i++;
}
- /* Defeat a VTE bug by moving the cursor and forcing a screen update. */
+ /* Defeat a VTE bug by homing the cursor and forcing a screen update. */
wmove(bottomwin, 0, 0);
wrefresh(bottomwin);
}