Problem: Using "1q" it is possible to unload a changed buffer. (Rick Howe)
Solution: Check the right window for changes.
*/
if (check_more(FALSE, eap->forceit) == OK && only_one_window())
exiting = TRUE;
- if ((!buf_hide(curbuf)
- && check_changed(curbuf, (p_awa ? CCGD_AW : 0)
+ if ((!buf_hide(wp->w_buffer)
+ && check_changed(wp->w_buffer, (p_awa ? CCGD_AW : 0)
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
|| check_more(TRUE, eap->forceit) == FAIL
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
+
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1205,
/**/
1204,
/**/