mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
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:
@@ -5656,8 +5656,13 @@ static void ex_quit(exarg_T *eap)
|
|||||||
|| (only_one_window() && check_changed_any(eap->forceit))) {
|
|| (only_one_window() && check_changed_any(eap->forceit))) {
|
||||||
not_exiting();
|
not_exiting();
|
||||||
} else {
|
} 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);
|
getout(0);
|
||||||
}
|
}
|
||||||
/* close window; may free buffer */
|
/* close window; may free buffer */
|
||||||
|
@@ -48,6 +48,12 @@ otestje3
|
|||||||
:au BufWipeout Xtestje1 buf Xtestje1
|
:au BufWipeout Xtestje1 buf Xtestje1
|
||||||
:bwipe
|
:bwipe
|
||||||
:w >>test.out
|
:w >>test.out
|
||||||
|
:only
|
||||||
|
:help
|
||||||
|
:wincmd w
|
||||||
|
:1quit
|
||||||
|
:$put ='Final line'
|
||||||
|
:$w >>test.out
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
|
@@ -28,3 +28,4 @@ testje1
|
|||||||
contents
|
contents
|
||||||
contents
|
contents
|
||||||
end of testfile
|
end of testfile
|
||||||
|
Final line
|
||||||
|
@@ -422,7 +422,7 @@ static int included_patches[] = {
|
|||||||
// 743,
|
// 743,
|
||||||
// 742,
|
// 742,
|
||||||
741,
|
741,
|
||||||
// 740,
|
740,
|
||||||
739,
|
739,
|
||||||
// 738 NA
|
// 738 NA
|
||||||
// 737,
|
// 737,
|
||||||
|
Reference in New Issue
Block a user