diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-06-19 12:43:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-06-19 12:43:07 +0200 |
commit | c7a0d32c834ff321491d8fd7bc68bf6cabd11e44 (patch) | |
tree | b6b44a0b1ba641a2b63f1185c454c342f387cdf0 /src/ex_docmd.c | |
parent | acc39888cddbc8082fb3b89c1a46646bdca55e42 (diff) | |
download | vim-git-c7a0d32c834ff321491d8fd7bc68bf6cabd11e44.tar.gz |
patch 7.4.740v7.4.740
Problem: ":1quit" works like ":.quit". (Bohr Shaw)
Solution: Don't exit Vim when a range is specified. (Christian Brabandt)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 9ae8fff2a..971a2022b 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7092,7 +7092,14 @@ ex_quit(eap) else { #ifdef FEAT_WINDOWS - 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)) #endif getout(0); #ifdef FEAT_WINDOWS |