From 04993f220a304efa029d44a74bbfa83a8530ea6e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Feb 2018 22:40:57 +0100 Subject: vim-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. https://github.com/vim/vim/commit/ff930cad8a9100eeb04256aab1a14de993c1d7e9 --- src/nvim/testdir/test_edit.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 1bcd245d01..8f815478c2 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1310,3 +1310,16 @@ func! Test_edit_rightleft() set norightleft bw! 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 + -- cgit