\#saveoptions fix

I hadn't ever used #saveoptions before and when I checked to see
whether the autounlock:none changes were being handled properly, I
discovered that options set via 'm O' weren't being handled at all.

This includes some miscellaneous reformatting of things noticed
while tracking down the problem.
This commit is contained in:
PatR
2022-10-13 13:19:58 -07:00
parent 37bfc4b522
commit b824031f12
3 changed files with 17 additions and 8 deletions
+6 -3
View File
@@ -2000,11 +2000,13 @@ do_write_config_file(void)
wait_synch();
pline("Some settings are not saved!");
wait_synch();
pline("All manual customization and comments are removed from the file!");
pline(
"All manual customization and comments are removed from the file!");
wait_synch();
}
#define overwrite_prompt "Overwrite config file %.*s?"
Sprintf(tmp, overwrite_prompt, (int)(BUFSZ - sizeof overwrite_prompt - 2), configfile);
Sprintf(tmp, overwrite_prompt,
(int) (BUFSZ - sizeof overwrite_prompt - 2), configfile);
#undef overwrite_prompt
if (!paranoid_query(TRUE, tmp))
return ECMD_OK;
@@ -2021,7 +2023,8 @@ do_write_config_file(void)
fclose(fp);
strbuf_empty(&buf);
if (wrote != len)
pline("An error occurred, wrote only partial data (%lu/%lu).", wrote, len);
pline("An error occurred, wrote only partial data (%lu/%lu).",
wrote, len);
}
return ECMD_OK;
}