diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-06 06:18:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-06 06:18:50 +0800 |
commit | a4e4e493df5f6897345278a460cccd175f7f4cf0 (patch) | |
tree | 3756b635dd15bd1feec4c710896f76673def8e81 /src | |
parent | 66568ed4521972cd34d9f635511b979481e2dc01 (diff) | |
parent | c7d12a5e0110d3dcaa866c157d12fd33a6bed95b (diff) | |
download | rneovim-a4e4e493df5f6897345278a460cccd175f7f4cf0.tar.gz rneovim-a4e4e493df5f6897345278a460cccd175f7f4cf0.tar.bz2 rneovim-a4e4e493df5f6897345278a460cccd175f7f4cf0.zip |
Merge pull request #28194 from zeertzjq/vim-9.1.0267
vim-patch:9.1.{0267,0268,0269}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 898c3fb3f9..b7f4f269e1 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -203,7 +203,6 @@ void dialog_changed(buf_T *buf, bool checkall) .append = false, .forceit = false, }; - bool empty_buf = buf->b_fname == NULL; dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname); if (checkall) { @@ -213,7 +212,8 @@ void dialog_changed(buf_T *buf, bool checkall) } if (ret == VIM_YES) { - if (empty_buf) { + bool empty_bufname = buf->b_fname == NULL; + if (empty_bufname) { buf_set_name(buf->b_fnum, "Untitled"); } @@ -225,7 +225,7 @@ void dialog_changed(buf_T *buf, bool checkall) } // restore to empty when write failed - if (empty_buf) { + if (empty_bufname) { XFREE_CLEAR(buf->b_fname); XFREE_CLEAR(buf->b_ffname); XFREE_CLEAR(buf->b_sfname); |