rcfile: restore terminal settings when exiting upon excessive unbindings
This fixes https://savannah.gnu.org/bugs/?58671.
Bug existed since commit 24cdf78a
from two weeks ago.
master
parent
3e609ee4c7
commit
2d204bcbfd
17
src/rcfile.c
17
src/rcfile.c
|
@ -1318,16 +1318,13 @@ static void check_vitals_mapped(void)
|
|||
for (int v = 0; v < VITALS; v++) {
|
||||
for (funcstruct *f = allfuncs; f != NULL; f = f->next) {
|
||||
if (f->func == vitals[v] && f->menus & inmenus[v]) {
|
||||
const keystruct *s = first_sc_for(inmenus[v], f->func);
|
||||
if (!s) {
|
||||
fprintf(stderr, _("No key is bound to function '%s' in "
|
||||
"menu '%s'. Exiting.\n"), f->desc,
|
||||
menu_to_name(inmenus[v]));
|
||||
fprintf(stderr, _("If needed, use nano with the -I option "
|
||||
"to adjust your nanorc settings.\n"));
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
if (first_sc_for(inmenus[v], f->func) == NULL) {
|
||||
jot_error(N_("No key is bound to function '%s' in menu '%s'. "
|
||||
" Exiting.\n"), f->desc, menu_to_name(inmenus[v]));
|
||||
die(_("If needed, use nano with the -I option "
|
||||
"to adjust your nanorc settings.\n"));
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue