mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.0.1100: stuck in redraw loop when 'lazyredraw' is set
Problem: Stuck in redraw loop when 'lazyredraw' is set. Solution: Don't loop on update_screen() when not redrawing. (Yasuhiro Matsumoto, closes #2082)
This commit is contained in:
@@ -10,7 +10,7 @@ int redraw_asap(int type);
|
|||||||
void redraw_after_callback(int call_update_screen);
|
void redraw_after_callback(int call_update_screen);
|
||||||
void redrawWinline(linenr_T lnum, int invalid);
|
void redrawWinline(linenr_T lnum, int invalid);
|
||||||
void update_curbuf(int type);
|
void update_curbuf(int type);
|
||||||
void update_screen(int type_arg);
|
int update_screen(int type_arg);
|
||||||
int conceal_cursor_line(win_T *wp);
|
int conceal_cursor_line(win_T *wp);
|
||||||
void conceal_check_cursur_line(void);
|
void conceal_check_cursur_line(void);
|
||||||
void update_single_line(win_T *wp, linenr_T lnum);
|
void update_single_line(win_T *wp, linenr_T lnum);
|
||||||
|
@@ -538,8 +538,9 @@ update_curbuf(int type)
|
|||||||
/*
|
/*
|
||||||
* Based on the current value of curwin->w_topline, transfer a screenfull
|
* Based on the current value of curwin->w_topline, transfer a screenfull
|
||||||
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
||||||
|
* Return OK when the screen was updated, FAIL if it was not done.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
update_screen(int type_arg)
|
update_screen(int type_arg)
|
||||||
{
|
{
|
||||||
int type = type_arg;
|
int type = type_arg;
|
||||||
@@ -557,7 +558,7 @@ update_screen(int type_arg)
|
|||||||
|
|
||||||
/* Don't do anything if the screen structures are (not yet) valid. */
|
/* Don't do anything if the screen structures are (not yet) valid. */
|
||||||
if (!screen_valid(TRUE))
|
if (!screen_valid(TRUE))
|
||||||
return;
|
return FAIL;
|
||||||
|
|
||||||
if (type == VALID_NO_UPDATE)
|
if (type == VALID_NO_UPDATE)
|
||||||
{
|
{
|
||||||
@@ -589,7 +590,7 @@ update_screen(int type_arg)
|
|||||||
must_redraw = type;
|
must_redraw = type;
|
||||||
if (type > INVERTED_ALL)
|
if (type > INVERTED_ALL)
|
||||||
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
|
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
|
||||||
return;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
updating_screen = TRUE;
|
updating_screen = TRUE;
|
||||||
@@ -842,6 +843,7 @@ update_screen(int type_arg)
|
|||||||
gui_update_scrollbars(FALSE);
|
gui_update_scrollbars(FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)
|
#if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)
|
||||||
|
@@ -40,7 +40,9 @@
|
|||||||
* TODO:
|
* TODO:
|
||||||
* - patch to use GUI or cterm colors for vterm. Yasuhiro, #2067
|
* - patch to use GUI or cterm colors for vterm. Yasuhiro, #2067
|
||||||
* - patch to add tmap, jakalope (Jacob Askeland) #2073
|
* - patch to add tmap, jakalope (Jacob Askeland) #2073
|
||||||
* - Redirecting output does not work on MS-Windows.
|
* - Redirecting output does not work on MS-Windows, Test_terminal_redir_file()
|
||||||
|
* is disabled.
|
||||||
|
* - test_terminal_no_cmd hangs (Christian)
|
||||||
* - implement term_setsize()
|
* - implement term_setsize()
|
||||||
* - add test for giving error for invalid 'termsize' value.
|
* - add test for giving error for invalid 'termsize' value.
|
||||||
* - support minimal size when 'termsize' is "rows*cols".
|
* - support minimal size when 'termsize' is "rows*cols".
|
||||||
@@ -1543,7 +1545,8 @@ terminal_loop(void)
|
|||||||
/* TODO: skip screen update when handling a sequence of keys. */
|
/* TODO: skip screen update when handling a sequence of keys. */
|
||||||
/* Repeat redrawing in case a message is received while redrawing. */
|
/* Repeat redrawing in case a message is received while redrawing. */
|
||||||
while (curwin->w_redr_type != 0)
|
while (curwin->w_redr_type != 0)
|
||||||
update_screen(0);
|
if (update_screen(0) == FAIL)
|
||||||
|
break;
|
||||||
update_cursor(curbuf->b_term, FALSE);
|
update_cursor(curbuf->b_term, FALSE);
|
||||||
|
|
||||||
c = term_vgetc();
|
c = term_vgetc();
|
||||||
|
@@ -769,6 +769,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 */
|
||||||
|
/**/
|
||||||
|
1100,
|
||||||
/**/
|
/**/
|
||||||
1099,
|
1099,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user