Patch 8.0.1100
Problem: Stuck in redraw loop when 'lazyredraw' is set.
Solution: Don't loop on update_screen() when not redrawing. (Yasuhiro
Matsumoto, closes #2082)
Files: src/terminal.c, src/screen.c, src/proto/screen.pro
*** ../vim-8.0.1099/src/terminal.c 2017-09-11 23:05:40.089143248 +0200
--- src/terminal.c 2017-09-13 22:04:50.099600392 +0200
***************
*** 40,46 ****
* TODO:
* - patch to use GUI or cterm colors for vterm. Yasuhiro, #2067
* - patch to add tmap, jakalope (Jacob Askeland) #2073
! * - Redirecting output does not work on MS-Windows.
* - implement term_setsize()
* - add test for giving error for invalid 'termsize' value.
* - support minimal size when 'termsize' is "rows*cols".
--- 40,48 ----
* TODO:
* - patch to use GUI or cterm colors for vterm. Yasuhiro, #2067
* - patch to add tmap, jakalope (Jacob Askeland) #2073
! * - Redirecting output does not work on MS-Windows,
Test_terminal_redir_file()
! * is disabled.
! * - test_terminal_no_cmd hangs (Christian)
* - implement term_setsize()
* - add test for giving error for invalid 'termsize' value.
* - support minimal size when 'termsize' is "rows*cols".
***************
*** 1543,1549 ****
/* TODO: skip screen update when handling a sequence of keys. */
/* Repeat redrawing in case a message is received while redrawing. */
while (curwin->w_redr_type != 0)
! update_screen(0);
update_cursor(curbuf->b_term, FALSE);
c = term_vgetc();
--- 1545,1552 ----
/* TODO: skip screen update when handling a sequence of keys. */
/* Repeat redrawing in case a message is received while redrawing. */
while (curwin->w_redr_type != 0)
! if (update_screen(0) == FAIL)
! break;
update_cursor(curbuf->b_term, FALSE);
c = term_vgetc();
*** ../vim-8.0.1099/src/screen.c 2017-09-11 23:05:40.089143248 +0200
--- src/screen.c 2017-09-13 22:04:19.071786031 +0200
***************
*** 538,545 ****
/*
* Based on the current value of curwin->w_topline, transfer a screenfull
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
*/
! void
update_screen(int type_arg)
{
int type = type_arg;
--- 538,546 ----
/*
* Based on the current value of curwin->w_topline, transfer a screenfull
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
+ * Return OK when the screen was updated, FAIL if it was not done.
*/
! int
update_screen(int type_arg)
{
int type = type_arg;
***************
*** 557,563 ****
/* Don't do anything if the screen structures are (not yet) valid. */
if (!screen_valid(TRUE))
! return;
if (type == VALID_NO_UPDATE)
{
--- 558,564 ----
/* Don't do anything if the screen structures are (not yet) valid. */
if (!screen_valid(TRUE))
! return FAIL;
if (type == VALID_NO_UPDATE)
{
***************
*** 589,595 ****
must_redraw = type;
if (type > INVERTED_ALL)
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
! return;
}
updating_screen = TRUE;
--- 590,596 ----
must_redraw = type;
if (type > INVERTED_ALL)
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
! return FAIL;
}
updating_screen = TRUE;
***************
*** 842,847 ****
--- 843,849 ----
gui_update_scrollbars(FALSE);
}
#endif
+ return OK;
}
#if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)
*** ../vim-8.0.1099/src/proto/screen.pro 2017-08-26 23:43:23.978903346
+0200
--- src/proto/screen.pro 2017-09-13 22:04:23.003762505 +0200
***************
*** 10,16 ****
void redraw_after_callback(int call_update_screen);
void redrawWinline(linenr_T lnum, int invalid);
void update_curbuf(int type);
! void update_screen(int type_arg);
int conceal_cursor_line(win_T *wp);
void conceal_check_cursur_line(void);
void update_single_line(win_T *wp, linenr_T lnum);
--- 10,16 ----
void redraw_after_callback(int call_update_screen);
void redrawWinline(linenr_T lnum, int invalid);
void update_curbuf(int type);
! int update_screen(int type_arg);
int conceal_cursor_line(win_T *wp);
void conceal_check_cursur_line(void);
void update_single_line(win_T *wp, linenr_T lnum);
*** ../vim-8.0.1099/src/version.c 2017-09-13 22:09:53.429787547 +0200
--- src/version.c 2017-09-13 22:11:17.153287788 +0200
***************
*** 771,772 ****
--- 771,774 ----
{ /* Add new patch number below this line */
+ /**/
+ 1100,
/**/
--
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
to the teacher you were stuck in Web traffic.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.