commit 13b839734f509de48627c2f2a76bfcc6ddd2dde3
parent 63bb1b62b70934daf4358da3dbcaa0da878ea5b3
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 26 Nov 2020 15:27:36 +0100
hellp: show all valid help items also in the Write-Out menu
Subtract one from the count only if all possible items in the menu
have been counted (item == NULL), meaning that the last item in the
Write-Out menu (the 'discard_buffer' function) has been counted too.
This fixes https://savannah.gnu.org/bugs/?59549.
Bug existed since version 4.5, commit b3ace4d8.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/global.c b/src/global.c
@@ -477,7 +477,8 @@ size_t shown_entries_for(int menu)
}
/* When --saveonexit is not used, widen the grid of the WriteOut menu. */
- if (menu == MWRITEFILE && first_sc_for(menu, discard_buffer) == NULL)
+ if (menu == MWRITEFILE && item == NULL &&
+ first_sc_for(menu, discard_buffer) == NULL)
count--;
return count;