mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
bindings: allow speller and friends to be rebound also in restricted mode
Speller, linter, formatter, and execute-a-command cannot be used in restricted mode, but the relevant keys should report that the function is *disabled*, not that the key is unbound. This fixes https://savannah.gnu.org/bugs/?64226. Problem existed since version 3.2, since nano reads the nanorc files also in restricted mode.
This commit is contained in:
parent
7f17777a4b
commit
fc42ab9b46
@ -1013,7 +1013,6 @@ void shortcut_init(void)
|
||||
add_to_funcs(to_next_anchor, MMAIN,
|
||||
N_("Down to anchor"), WHENHELP(nextanchor_gist), BLANKAFTER);
|
||||
|
||||
if (!ISSET(RESTRICTED)) {
|
||||
#ifdef ENABLE_SPELLER
|
||||
add_to_funcs(do_spell, MMAIN,
|
||||
N_("Spell Check"), WHENHELP(spell_gist), TOGETHER);
|
||||
@ -1026,7 +1025,10 @@ void shortcut_init(void)
|
||||
add_to_funcs(do_formatter, MMAIN,
|
||||
N_("Formatter"), WHENHELP(formatter_gist), BLANKAFTER);
|
||||
#endif
|
||||
}
|
||||
/* Although not allowed in restricted mode, keep execution rebindable. */
|
||||
if (ISSET(RESTRICTED))
|
||||
add_to_funcs(do_execute, MMAIN,
|
||||
N_("Execute"), WHENHELP(execute_gist), TOGETHER);
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#ifdef NANO_TINY
|
||||
|
Loading…
Reference in New Issue
Block a user