xC: general.save_on_quit -> general.autosave
Power outages and similar situations make the former unreliable, so get rid of any false promise it might seem to give.
This commit is contained in:
parent
dc002a2db4
commit
03d8ea4c5a
2
NEWS
2
NEWS
|
@ -4,6 +4,8 @@ Unreleased
|
|||
with the exception of editor_command/editor, backlog_helper/pager,
|
||||
and backlog_helper_strip_formatting/pager_strip_formatting
|
||||
|
||||
* xC: replaced behaviour.save_on_quit with general.autosave
|
||||
|
||||
* xC: improved pager integration capabilities
|
||||
|
||||
* xC: made it show WALLOPS messages, as PRIVMSG for the server buffer
|
||||
|
|
12
xC.c
12
xC.c
|
@ -2422,8 +2422,8 @@ static struct config_schema g_config_server[] =
|
|||
|
||||
static struct config_schema g_config_general[] =
|
||||
{
|
||||
{ .name = "save_on_quit",
|
||||
.comment = "Save configuration before quitting",
|
||||
{ .name = "autosave",
|
||||
.comment = "Save configuration automatically after each change",
|
||||
.type = CONFIG_ITEM_BOOLEAN,
|
||||
.default_ = "on" },
|
||||
{ .name = "debug_mode",
|
||||
|
@ -11363,6 +11363,8 @@ static bool
|
|||
handle_command_set_assign
|
||||
(struct app_context *ctx, struct strv *all, char *arguments)
|
||||
{
|
||||
hard_assert (all->len > 0);
|
||||
|
||||
char *op = cut_word (&arguments);
|
||||
bool add = false;
|
||||
bool remove = false;
|
||||
|
@ -11397,6 +11399,9 @@ handle_command_set_assign
|
|||
free (key);
|
||||
}
|
||||
config_item_destroy (new_);
|
||||
|
||||
if (get_config_boolean (ctx->config.root, "general.autosave"))
|
||||
save_configuration (ctx);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -14748,9 +14753,6 @@ main (int argc, char *argv[])
|
|||
|
||||
CALL (ctx.input, stop);
|
||||
|
||||
if (get_config_boolean (ctx.config.root, "general.save_on_quit"))
|
||||
save_configuration (&ctx);
|
||||
|
||||
app_context_free (&ctx);
|
||||
toggle_bracketed_paste (false);
|
||||
free_terminal ();
|
||||
|
|
Loading…
Reference in New Issue