diff options
| author | Jurica Bradaric <jbradaric@gmail.com> | 2016-01-28 18:35:20 +0100 | 
|---|---|---|
| committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-01 09:04:08 +0100 | 
| commit | 208f9dd09d6d9d12679ad57cf1583f330665f7ad (patch) | |
| tree | c7e1a7a53fe8f80d72ec2c983173fb2e7a8539c1 /src/nvim/ex_docmd.c | |
| parent | 76086b36b777440a79b77e8c7a3670f5b0003917 (diff) | |
| download | rneovim-208f9dd09d6d9d12679ad57cf1583f330665f7ad.tar.gz rneovim-208f9dd09d6d9d12679ad57cf1583f330665f7ad.tar.bz2 rneovim-208f9dd09d6d9d12679ad57cf1583f330665f7ad.zip | |
vim-patch:7.4.740
Problem:    ":1quit" works like ":.quit". (Bohr Shaw)
Solution:   Don't exit Vim when a range is specified. (Christian Brabandt)
https://github.com/vim/vim/commit/c7a0d32c834ff321491d8fd7bc68bf6cabd11e44
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 */ | 
