aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorii14 <ii14@users.noreply.github.com>2022-07-26 20:54:43 +0200
committerii14 <ii14@users.noreply.github.com>2022-07-26 20:57:57 +0200
commit4225e6ee46c55ff0930c8435a049309974b7c006 (patch)
treebe4214d4750a138c96495ae0f03283525270e668 /src/nvim/testdir
parent2a9c9371bc6d7e3c92eace673d1ed3740b12a270 (diff)
downloadrneovim-4225e6ee46c55ff0930c8435a049309974b7c006.tar.gz
rneovim-4225e6ee46c55ff0930c8435a049309974b7c006.tar.bz2
rneovim-4225e6ee46c55ff0930c8435a049309974b7c006.zip
vim-patch:9.0.0085: ":write" fails after ":file name" and the ":edit"
Problem: ":write" fails after ":file name" and the ":edit". Solution: Reset BF_NOTEDITED when using ":edit". (closes vim/vim#10790) https://github.com/vim/vim/commit/1f0dc5e84f5cc530c0fb9d0789e3d42d644429d7
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_excmd.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim
index f844999d8d..dac7a6989d 100644
--- a/src/nvim/testdir/test_excmd.vim
+++ b/src/nvim/testdir/test_excmd.vim
@@ -696,5 +696,21 @@ func Test_using_zero_in_range()
bwipe!
endfunc
+" Test :write after changing name with :file and loading it with :edit
+func Test_write_after_rename()
+ call writefile(['text'], 'Xfile')
+
+ enew
+ file Xfile
+ call assert_fails('write', 'E13: File exists (add ! to override)')
+
+ " works OK after ":edit"
+ edit
+ write
+
+ call delete('Xfile')
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab