options: --ignorercfiles is now available in restricted mode

Also, allow syntax highlighting to be toggled in restricted mode,
and adjust a comment.
master
Benno Schulenberg 2018-09-30 13:20:43 +02:00
parent 339e0c131a
commit b81995af8a
1 changed files with 4 additions and 7 deletions

View File

@ -805,8 +805,7 @@ void usage(void)
N_("Log & read search/replace string history")); N_("Log & read search/replace string history"));
#endif #endif
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
if (!ISSET(RESTRICTED)) print_opt("-I", "--ignorercfiles", N_("Don't look at nanorc files"));
print_opt("-I", "--ignorercfiles", N_("Don't look at nanorc files"));
#endif #endif
print_opt("-K", "--rebindkeypad", print_opt("-K", "--rebindkeypad",
N_("Fix numeric keypad key confusion problem")); N_("Fix numeric keypad key confusion problem"));
@ -1369,7 +1368,7 @@ void do_toggle(int flag)
{ {
bool enabled; bool enabled;
if (ISSET(RESTRICTED) && (flag == SUSPEND || flag == NO_COLOR_SYNTAX)) { if (flag == SUSPEND && ISSET(RESTRICTED)) {
show_restricted_warning(); show_restricted_warning();
return; return;
} }
@ -2451,13 +2450,11 @@ int main(int argc, char **argv)
#endif /* ENABLE_HISTORIES */ #endif /* ENABLE_HISTORIES */
#ifndef NANO_TINY #ifndef NANO_TINY
/* If backups are enabled and a backup directory was specified and /* If backups are enabled and a backup directory was specified, make sure
* we're not in restricted mode, make sure the path exists and is * the path exists and is a folder, so backup files can be saved there. */
* a directory, so that backup files can be saved there. */
if (ISSET(BACKUP_FILE) && backup_dir != NULL) if (ISSET(BACKUP_FILE) && backup_dir != NULL)
init_backup_dir(); init_backup_dir();
#endif #endif
#ifdef ENABLE_OPERATINGDIR #ifdef ENABLE_OPERATINGDIR
/* Set up the operating directory. This entails chdir()ing there, /* Set up the operating directory. This entails chdir()ing there,
* so that file reads and writes will be based there. */ * so that file reads and writes will be based there. */