diff options
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 53a5018fe0..40ff29d4a8 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -1298,7 +1298,12 @@ void dialog_changed(buf_T *buf, bool checkall) { char_u buff[DIALOG_MSG_SIZE]; int ret; - exarg_T ea; + // Init ea pseudo-structure, this is needed for the check_overwrite() + // function. + exarg_T ea = { + .append = false, + .forceit = false, + }; dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname); if (checkall) { @@ -1307,10 +1312,6 @@ void dialog_changed(buf_T *buf, bool checkall) ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1); } - // Init ea pseudo-structure, this is needed for the check_overwrite() - // function. - ea.append = ea.forceit = false; - if (ret == VIM_YES) { if (buf->b_fname != NULL && check_overwrite(&ea, |