Commit efbf7b6e authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Making the four toggles that don't have any effect in restricted mode

say that they're disabled.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5328 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 5885e34b
Showing with 8 additions and 0 deletions
+8 -0
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
say that this function is disabled than that no linter was defined. say that this function is disabled than that no linter was defined.
* src/nano.c (usage): When asking for --help in restricted mode, don't * src/nano.c (usage): When asking for --help in restricted mode, don't
show options that don't have any effect. show options that don't have any effect.
* src/nano.c (do_toggle): Make the four toggles that don't have any
effect in restricted mode say that they're disabled.
2015-07-28 Benno Schulenberg <bensberg@justemail.net> 2015-07-28 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_formatter), src/nano.c (allow_pending_sigwinch): * src/text.c (do_formatter), src/nano.c (allow_pending_sigwinch):
......
...@@ -1426,6 +1426,12 @@ void do_toggle(int flag) ...@@ -1426,6 +1426,12 @@ void do_toggle(int flag)
{ {
bool enabled; bool enabled;
if (ISSET(RESTRICTED) && (flag == SUSPEND || flag == MULTIBUFFER ||
flag == BACKUP_FILE || flag == NO_COLOR_SYNTAX)) {
nano_disabled_msg();
return;
}
TOGGLE(flag); TOGGLE(flag);
switch (flag) { switch (flag) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment