vim-patch:7.4.740

Problem:    ":1quit" works like ":.quit". (Bohr Shaw)
Solution:   Don't exit Vim when a range is specified. (Christian Brabandt)

c7a0d32c83
This commit is contained in:
Jurica Bradaric
2016-01-28 18:35:20 +01:00
parent 76086b36b7
commit 208f9dd09d
4 changed files with 15 additions and 3 deletions

View File

@@ -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 */