mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.740
Problem: ":1quit" works like ":.quit". (Bohr Shaw) Solution: Don't exit Vim when a range is specified. (Christian Brabandt)
This commit is contained in:
@@ -7092,7 +7092,14 @@ ex_quit(eap)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef FEAT_WINDOWS
|
#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
|
#endif
|
||||||
getout(0);
|
getout(0);
|
||||||
#ifdef FEAT_WINDOWS
|
#ifdef FEAT_WINDOWS
|
||||||
|
@@ -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
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
740,
|
||||||
/**/
|
/**/
|
||||||
739,
|
739,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user