0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 8.0.1205: it is possible to unload a changed buffer

Problem:    Using "1q" it is possible to unload a changed buffer. (Rick Howe)
Solution:   Check the right window for changes.
This commit is contained in:
Bram Moolenaar
2017-10-19 17:12:10 +02:00
parent 87ffb5c1a3
commit ff930cad8a
3 changed files with 17 additions and 2 deletions

View File

@@ -1373,3 +1373,16 @@ func Test_edit_complete_very_long_name()
endif
set swapfile&
endfunc
func Test_edit_quit()
edit foo.txt
split
new
call setline(1, 'hello')
3wincmd w
redraw!
call assert_fails('1q', 'E37:')
bwipe! foo.txt
only
endfunc