Mercurial > vim
diff src/screen.c @ 12441:854f49cf0abe v8.0.1100
patch 8.0.1100: stuck in redraw loop when 'lazyredraw' is set
commit https://github.com/vim/vim/commit/072412ed45aa20a67aaa7e387d7f6bf59c7d3fbe
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 13 22:11:35 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 13 Sep 2017 22:15:05 +0200 |
parents | 40961647f547 |
children | 68d7bc045dbe |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -538,8 +538,9 @@ update_curbuf(int type) /* * Based on the current value of curwin->w_topline, transfer a screenfull * of stuff from Filemem to ScreenLines[], and update curwin->w_botline. - */ - void + * Return OK when the screen was updated, FAIL if it was not done. + */ + int update_screen(int 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. */ if (!screen_valid(TRUE)) - return; + return FAIL; if (type == VALID_NO_UPDATE) { @@ -589,7 +590,7 @@ update_screen(int type_arg) must_redraw = type; if (type > INVERTED_ALL) curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */ - return; + return FAIL; } updating_screen = TRUE; @@ -842,6 +843,7 @@ update_screen(int type_arg) gui_update_scrollbars(FALSE); } #endif + return OK; } #if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)