To: vim_dev@googlegroups.com Subject: Patch 8.0.1205 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1205 Problem: Using "1q" it is possible to unload a changed buffer. (Rick Howe) Solution: Check the right window for changes. Files: src/testdir/test_edit.vim, src/ex_docmd.c *** ../vim-8.0.1204/src/testdir/test_edit.vim 2017-10-15 22:07:35.207683184 +0200 --- src/testdir/test_edit.vim 2017-10-19 17:10:44.169305819 +0200 *************** *** 1373,1375 **** --- 1373,1388 ---- 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 + *** ../vim-8.0.1204/src/ex_docmd.c 2017-10-19 12:37:38.313753603 +0200 --- src/ex_docmd.c 2017-10-19 17:11:06.117155293 +0200 *************** *** 7245,7252 **** */ if (check_more(FALSE, eap->forceit) == OK && only_one_window()) exiting = TRUE; ! if ((!buf_hide(curbuf) ! && check_changed(curbuf, (p_awa ? CCGD_AW : 0) | (eap->forceit ? CCGD_FORCEIT : 0) | CCGD_EXCMD)) || check_more(TRUE, eap->forceit) == FAIL --- 7245,7252 ---- */ if (check_more(FALSE, eap->forceit) == OK && only_one_window()) exiting = TRUE; ! 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 *** ../vim-8.0.1204/src/version.c 2017-10-19 12:37:38.317753577 +0200 --- src/version.c 2017-10-19 16:44:34.548067683 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1205, /**/ -- ARTHUR: I did say sorry about the `old woman,' but from the behind you looked-- DENNIS: What I object to is you automatically treat me like an inferior! ARTHUR: Well, I AM king... The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///