summaryrefslogtreecommitdiff
path: root/src/testdir/test_edit.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-19 17:12:10 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-19 17:12:10 +0200
commitff930cad8a9100eeb04256aab1a14de993c1d7e9 (patch)
tree087239febd09bb9c435e93dff38972d7a1cb6790 /src/testdir/test_edit.vim
parent87ffb5c1a3aa506a1be07af4e794b3753f839dc3 (diff)
downloadvim-ff930cad8a9100eeb04256aab1a14de993c1d7e9.zip
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.
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r--src/testdir/test_edit.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 3fcb8a351..bb3af2710 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -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
+