aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-05-06 08:19:30 +0800
committerGitHub <noreply@github.com>2026-05-06 08:19:30 +0800
commit2bb426ce4a9cf890edafec5916bb6db8a0523975 (patch)
tree03e53b5ce51e60d85128bfb2035a6bee6bb6c993 /runtime/lua
parentf39f6f72a7907a204decb4f8fbe7ee0e7deb87fa (diff)
downloadrneovim-2bb426ce4a9cf890edafec5916bb6db8a0523975.tar.gz
rneovim-2bb426ce4a9cf890edafec5916bb6db8a0523975.tar.bz2
rneovim-2bb426ce4a9cf890edafec5916bb6db8a0523975.zip
vim-patch:9.2.0443: GUI: cancelling save dialog overwrites or discards unnamed buffer (#39617)
Problem: When closing gvim with an unsaved unnamed buffer, choosing "Yes" in the "Save changes?" dialog and then "Cancel" in the file selection dialog either silently writes the buffer to a file named "Untitled" (overwriting any existing file with that name) or discards the buffer altogether (vibs29, after v9.1.0265). Solution: In dialog_changed(), if browse_save_fname() leaves the buffer without a file name, treat it as a cancel and return without saving. Also stop clearing the modified flag in the restore path on write failure, so the unsaved changes are kept and the caller (e.g. gui_shell_closed()) can also cancel the close. Pre-fill the file dialog with "Untitled" to match the preceding "Save changes to ..." prompt. Add a test for the write-failure path (Hirohito Higashi). fixes: vim/vim#20132 closes: vim/vim#20143 https://github.com/vim/vim/commit/cf947e7ef09fc8a63f447b54b107585b8f3b7abe Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions