diff --git a/src/global.c b/src/global.c index 7c6ebe6f..79a89978 100644 --- a/src/global.c +++ b/src/global.c @@ -428,8 +428,8 @@ int the_code_for(void (*func)(void), int defaultval) return s->keycode; } -/* Return the number of entries in the shortcut list for a given menu. */ -size_t length_of_list(int menu) +/* Return the number of entries that can be shown in the given menu. */ +size_t shown_entries_for(int menu) { funcstruct *item; size_t count = 0; diff --git a/src/proto.h b/src/proto.h index 68d3dc6d..7b135fce 100644 --- a/src/proto.h +++ b/src/proto.h @@ -319,7 +319,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, /* Some functions in global.c. */ const keystruct *first_sc_for(int menu, void (*func)(void)); int the_code_for(void (*func)(void), int defaultval); -size_t length_of_list(int menu); +size_t shown_entries_for(int menu); const keystruct *get_shortcut(int *kbinput); functionptrtype func_from_key(int *kbinput); int keycode_from_string(const char *keystring); diff --git a/src/winio.c b/src/winio.c index d5e29bc3..a672e2b8 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1696,7 +1696,7 @@ int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts) } /* Determine how many shortcuts are being shown. */ - number = length_of_list(currmenu); + number = shown_entries_for(currmenu); /* Calculate the width of each non-rightmost shortcut item; * the rightmost ones will "absorb" any remaining slack. */ @@ -2293,7 +2293,7 @@ void bottombars(int menu) return; /* Determine how many shortcuts must be shown. */ - number = length_of_list(menu); + number = shown_entries_for(menu); /* Compute the width of each keyname-plus-explanation pair. */ itemwidth = COLS / ((number / 2) + (number % 2));