prompt: toggle the help lines only for the 'nohelp' toggle
This fixes https://savannah.gnu.org/bugs/?62914. Problem existed since commit 958ec294 from three days ago.
This commit is contained in:
parent
aba4f4e0e2
commit
a374dd0359
@ -523,7 +523,7 @@ char *browse(char *path)
|
||||
#ifndef NANO_TINY
|
||||
/* The terminal dimensions might have changed, so act as if. */
|
||||
kbinput = KEY_WINCH;
|
||||
} else if (function == do_toggle) {
|
||||
} else if (function == do_toggle && get_shortcut(kbinput)->toggle == NO_HELP) {
|
||||
TOGGLE(NO_HELP);
|
||||
window_init();
|
||||
kbinput = KEY_WINCH;
|
||||
|
||||
@ -520,7 +520,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
||||
if (function == do_help || function == full_refresh)
|
||||
function();
|
||||
#ifndef NANO_TINY
|
||||
else if (function == do_toggle) {
|
||||
else if (function == do_toggle && shortcut->toggle == NO_HELP) {
|
||||
TOGGLE(NO_HELP);
|
||||
window_init();
|
||||
focusing = FALSE;
|
||||
@ -639,6 +639,7 @@ int ask_user(bool withall, const char *question)
|
||||
const char *yesstr = _("Yy");
|
||||
const char *nostr = _("Nn");
|
||||
const char *allstr = _("Aa");
|
||||
const keystruct *shortcut;
|
||||
functionptrtype function;
|
||||
|
||||
while (choice == UNDECIDED) {
|
||||
@ -735,14 +736,15 @@ int ask_user(bool withall, const char *question)
|
||||
if (choice != UNDECIDED)
|
||||
break;
|
||||
|
||||
function = func_from_key(kbinput);
|
||||
shortcut = get_shortcut(kbinput);
|
||||
function = (shortcut ? shortcut->func : NULL);
|
||||
|
||||
if (function == do_cancel)
|
||||
choice = CANCEL;
|
||||
else if (function == full_refresh)
|
||||
full_refresh();
|
||||
#ifndef NANO_TINY
|
||||
else if (function == do_toggle) {
|
||||
else if (function == do_toggle && shortcut->toggle == NO_HELP) {
|
||||
TOGGLE(NO_HELP);
|
||||
window_init();
|
||||
titlebar(NULL);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user