tweaks: drop the checking of two flags that can no longer be toggled
Also, remove a superfluous condition, and swap two others.master
parent
f4c958e810
commit
062b6691bb
|
@ -1369,8 +1369,7 @@ void do_toggle(int flag)
|
||||||
{
|
{
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
|
||||||
if (ISSET(RESTRICTED) && (flag == SUSPEND || flag == MULTIBUFFER ||
|
if (ISSET(RESTRICTED) && (flag == SUSPEND || flag == NO_COLOR_SYNTAX)) {
|
||||||
flag == BACKUP_FILE || flag == NO_COLOR_SYNTAX)) {
|
|
||||||
show_restricted_warning();
|
show_restricted_warning();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2456,7 +2455,7 @@ int main(int argc, char **argv)
|
||||||
/* If backups are enabled and a backup directory was specified and
|
/* If backups are enabled and a backup directory was specified and
|
||||||
* we're not in restricted mode, make sure the path exists and is
|
* we're not in restricted mode, make sure the path exists and is
|
||||||
* a directory, so that backup files can be saved there. */
|
* a directory, so that backup files can be saved there. */
|
||||||
if (ISSET(BACKUP_FILE) && backup_dir != NULL && !ISSET(RESTRICTED))
|
if (ISSET(BACKUP_FILE) && backup_dir != NULL)
|
||||||
init_backup_dir();
|
init_backup_dir();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2496,8 +2495,9 @@ int main(int argc, char **argv)
|
||||||
* does (unless we're using restricted mode, in which case spell
|
* does (unless we're using restricted mode, in which case spell
|
||||||
* checking is disabled, since it would allow reading from or
|
* checking is disabled, since it would allow reading from or
|
||||||
* writing to files not specified on the command line). */
|
* writing to files not specified on the command line). */
|
||||||
if (!ISSET(RESTRICTED) && alt_speller == NULL) {
|
if (alt_speller == NULL && !ISSET(RESTRICTED)) {
|
||||||
const char *spellenv = getenv("SPELL");
|
const char *spellenv = getenv("SPELL");
|
||||||
|
|
||||||
if (spellenv != NULL)
|
if (spellenv != NULL)
|
||||||
alt_speller = mallocstrcpy(NULL, spellenv);
|
alt_speller = mallocstrcpy(NULL, spellenv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue