mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.1.0537: ui_breakcheck() may be called recursively
Problem: ui_breakcheck() may be called recursively, which doesn't work. Solution: When called recursively, just return. (James McCoy, closes #3617)
This commit is contained in:
14
src/ui.c
14
src/ui.c
@@ -403,9 +403,17 @@ ui_breakcheck(void)
|
|||||||
void
|
void
|
||||||
ui_breakcheck_force(int force)
|
ui_breakcheck_force(int force)
|
||||||
{
|
{
|
||||||
int save_updating_screen = updating_screen;
|
static int recursive = FALSE;
|
||||||
|
int save_updating_screen = updating_screen;
|
||||||
|
|
||||||
/* We do not want gui_resize_shell() to redraw the screen here. */
|
// We could be called recursively if stderr is redirected, calling
|
||||||
|
// fill_input_buf() calls settmode() when stdin isn't a tty. settmode()
|
||||||
|
// calls vgetorpeek() which calls ui_breakcheck() again.
|
||||||
|
if (recursive)
|
||||||
|
return;
|
||||||
|
recursive = TRUE;
|
||||||
|
|
||||||
|
// We do not want gui_resize_shell() to redraw the screen here.
|
||||||
++updating_screen;
|
++updating_screen;
|
||||||
|
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
@@ -419,6 +427,8 @@ ui_breakcheck_force(int force)
|
|||||||
updating_screen = TRUE;
|
updating_screen = TRUE;
|
||||||
else
|
else
|
||||||
reset_updating_screen(FALSE);
|
reset_updating_screen(FALSE);
|
||||||
|
|
||||||
|
recursive = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@@ -792,6 +792,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 */
|
||||||
|
/**/
|
||||||
|
537,
|
||||||
/**/
|
/**/
|
||||||
536,
|
536,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user