diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-24 02:56:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 02:56:18 +0200 |
commit | 2b473a9df8dc4a6f0129ae3b0f830cdac3864620 (patch) | |
tree | 1f3153258386fec61320ee6bbbf2793c9cdb55b7 /src/nvim/ex_docmd.c | |
parent | d011facf456dc85308cf58b6f0c6a06c4ddd7bb2 (diff) | |
parent | 86f2c473dc0e5b3c886d71b2fee99e1f3c9849b6 (diff) | |
download | rneovim-2b473a9df8dc4a6f0129ae3b0f830cdac3864620.tar.gz rneovim-2b473a9df8dc4a6f0129ae3b0f830cdac3864620.tar.bz2 rneovim-2b473a9df8dc4a6f0129ae3b0f830cdac3864620.zip |
Merge #7061 from ckelsel/vim-8.0.0069
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 5d7246581c..d2eb881bc6 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5976,7 +5976,7 @@ static void ex_quit(exarg_T *eap) // specified. Example: // :h|wincmd w|1q - don't quit // :h|wincmd w|q - quit - if (only_one_window() && (firstwin == lastwin || eap->addr_count == 0)) { + if (only_one_window() && (ONE_WINDOW || eap->addr_count == 0)) { getout(0); } /* close window; may free buffer */ @@ -6174,12 +6174,14 @@ static void ex_tabonly(exarg_T *eap) */ void tabpage_close(int forceit) { - /* First close all the windows but the current one. If that worked then - * close the last window in this tab, that will close it. */ - if (lastwin != firstwin) - close_others(TRUE, forceit); - if (lastwin == firstwin) + // First close all the windows but the current one. If that worked then + // close the last window in this tab, that will close it. + if (!ONE_WINDOW) { + close_others(true, forceit); + } + if (ONE_WINDOW) { ex_win_close(forceit, curwin, NULL); + } } /* |