mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.1-059
This commit is contained in:
31
src/main.c
31
src/main.c
@@ -954,7 +954,8 @@ main_loop(cmdwin, noexmode)
|
|||||||
int cmdwin; /* TRUE when working in the command-line window */
|
int cmdwin; /* TRUE when working in the command-line window */
|
||||||
int noexmode; /* TRUE when return on entering Ex mode */
|
int noexmode; /* TRUE when return on entering Ex mode */
|
||||||
{
|
{
|
||||||
oparg_T oa; /* operator arguments */
|
oparg_T oa; /* operator arguments */
|
||||||
|
int previous_got_int = FALSE; /* "got_int" was TRUE */
|
||||||
|
|
||||||
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
|
#if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
|
||||||
/* Setup to catch a terminating error from the X server. Just ignore
|
/* Setup to catch a terminating error from the X server. Just ignore
|
||||||
@@ -1015,12 +1016,32 @@ main_loop(cmdwin, noexmode)
|
|||||||
need_fileinfo = FALSE;
|
need_fileinfo = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (got_int && !global_busy)
|
|
||||||
|
/* Reset "got_int" now that we got back to the main loop. Except when
|
||||||
|
* inside a ":g/pat/cmd" command, then the "got_int" needs to abort
|
||||||
|
* the ":g" command.
|
||||||
|
* For ":g/pat/vi" we reset "got_int" when used once. When used
|
||||||
|
* a second time we go back to Ex mode and abort the ":g" command. */
|
||||||
|
if (got_int)
|
||||||
{
|
{
|
||||||
if (!quit_more)
|
if (noexmode && global_busy && !exmode_active && previous_got_int)
|
||||||
(void)vgetc(); /* flush all buffers */
|
{
|
||||||
got_int = FALSE;
|
/* Typed two CTRL-C in a row: go back to ex mode as if "Q" was
|
||||||
|
* used and keep "got_int" set, so that it aborts ":g". */
|
||||||
|
exmode_active = EXMODE_NORMAL;
|
||||||
|
State = NORMAL;
|
||||||
|
}
|
||||||
|
else if (!global_busy || !exmode_active)
|
||||||
|
{
|
||||||
|
if (!quit_more)
|
||||||
|
(void)vgetc(); /* flush all buffers */
|
||||||
|
got_int = FALSE;
|
||||||
|
}
|
||||||
|
previous_got_int = TRUE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
previous_got_int = FALSE;
|
||||||
|
|
||||||
if (!exmode_active)
|
if (!exmode_active)
|
||||||
msg_scroll = FALSE;
|
msg_scroll = FALSE;
|
||||||
quit_more = FALSE;
|
quit_more = FALSE;
|
||||||
|
@@ -666,6 +666,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 */
|
||||||
|
/**/
|
||||||
|
59,
|
||||||
/**/
|
/**/
|
||||||
58,
|
58,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user