diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-02 22:09:05 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-02 22:09:05 -0500 |
commit | a4ea4dac4568f9ad12956e30d32e2e16da0099cb (patch) | |
tree | bfb8f9fd77e3d97163d7c501e072aced091537ef /src/nvim/ex_docmd.c | |
parent | 3d15cab29d2dc2448066e6b839a04d88859ab0db (diff) | |
parent | ac88c35d32f72c1b24d34b4995c5725b960d4bdf (diff) | |
download | rneovim-a4ea4dac4568f9ad12956e30d32e2e16da0099cb.tar.gz rneovim-a4ea4dac4568f9ad12956e30d32e2e16da0099cb.tar.bz2 rneovim-a4ea4dac4568f9ad12956e30d32e2e16da0099cb.zip |
Merge #4120 'vim-patch:7.4.740'
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 1ae440c757..cb8f91328d 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5656,8 +5656,13 @@ static void ex_quit(exarg_T *eap) || (only_one_window() && check_changed_any(eap->forceit))) { not_exiting(); } else { - if (only_one_window()) { - // quit last window + // quit last window + // Note: only_one_window() returns true, even so a help window is + // still open. In that case only quit, if no address has been + // specified. Example: + // :h|wincmd w|1q - don't quit + // :h|wincmd w|q - quit + if (only_one_window() && (firstwin == lastwin || eap->addr_count == 0)) { getout(0); } /* close window; may free buffer */ |