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.
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 3fcb8a3..bb3af27 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1373,3 +1373,16 @@
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
+