diff options
author | James McCoy <jamessan@jamessan.com> | 2016-05-10 22:50:31 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-05-14 17:16:18 -0400 |
commit | 8c399d6b37f967d0ec9991d873666036de196a0a (patch) | |
tree | 25c816240e4bee86b6ee96ee0585c601ef9dcc4c /src/nvim/ex_docmd.c | |
parent | 529e2ab17828943cf5004534429eab7a0b08cf91 (diff) | |
download | rneovim-8c399d6b37f967d0ec9991d873666036de196a0a.tar.gz rneovim-8c399d6b37f967d0ec9991d873666036de196a0a.tar.bz2 rneovim-8c399d6b37f967d0ec9991d873666036de196a0a.zip |
vim-patch:7.4.1037
Problem: Using "q!" when there is a modified hidden buffer does not unload
the current buffer, resulting in the need to abandon it again.
Solution: When using "q!" unload the current buffer when needed. (Yasuhiro
Matsumoto, Hirohito Higashi)
https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 89c35a3c45..bbe3525403 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5674,7 +5674,7 @@ static void ex_quit(exarg_T *eap) | (eap->forceit ? CCGD_FORCEIT : 0) | CCGD_EXCMD)) || check_more(TRUE, eap->forceit) == FAIL - || (only_one_window() && check_changed_any(eap->forceit))) { + || (only_one_window() && check_changed_any(eap->forceit, true))) { not_exiting(); } else { // quit last window @@ -5723,9 +5723,10 @@ static void ex_quit_all(exarg_T *eap) if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) return; - exiting = TRUE; - if (eap->forceit || !check_changed_any(FALSE)) + exiting = true; + if (eap->forceit || !check_changed_any(false, false)) { getout(0); + } not_exiting(); } @@ -6019,7 +6020,7 @@ static void ex_exit(exarg_T *eap) || curbufIsChanged()) && do_write(eap) == FAIL) || check_more(TRUE, eap->forceit) == FAIL - || (only_one_window() && check_changed_any(eap->forceit))) { + || (only_one_window() && check_changed_any(eap->forceit, false))) { not_exiting(); } else { if (only_one_window()) /* quit last window, exit Vim */ |