Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
12440:f62b3864c693 | 12441:854f49cf0abe |
---|---|
536 } | 536 } |
537 | 537 |
538 /* | 538 /* |
539 * Based on the current value of curwin->w_topline, transfer a screenfull | 539 * Based on the current value of curwin->w_topline, transfer a screenfull |
540 * of stuff from Filemem to ScreenLines[], and update curwin->w_botline. | 540 * of stuff from Filemem to ScreenLines[], and update curwin->w_botline. |
541 * Return OK when the screen was updated, FAIL if it was not done. | |
541 */ | 542 */ |
542 void | 543 int |
543 update_screen(int type_arg) | 544 update_screen(int type_arg) |
544 { | 545 { |
545 int type = type_arg; | 546 int type = type_arg; |
546 win_T *wp; | 547 win_T *wp; |
547 static int did_intro = FALSE; | 548 static int did_intro = FALSE; |
555 #endif | 556 #endif |
556 int no_update = FALSE; | 557 int no_update = FALSE; |
557 | 558 |
558 /* Don't do anything if the screen structures are (not yet) valid. */ | 559 /* Don't do anything if the screen structures are (not yet) valid. */ |
559 if (!screen_valid(TRUE)) | 560 if (!screen_valid(TRUE)) |
560 return; | 561 return FAIL; |
561 | 562 |
562 if (type == VALID_NO_UPDATE) | 563 if (type == VALID_NO_UPDATE) |
563 { | 564 { |
564 no_update = TRUE; | 565 no_update = TRUE; |
565 type = 0; | 566 type = 0; |
587 { | 588 { |
588 redraw_later(type); /* remember type for next time */ | 589 redraw_later(type); /* remember type for next time */ |
589 must_redraw = type; | 590 must_redraw = type; |
590 if (type > INVERTED_ALL) | 591 if (type > INVERTED_ALL) |
591 curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */ | 592 curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */ |
592 return; | 593 return FAIL; |
593 } | 594 } |
594 | 595 |
595 updating_screen = TRUE; | 596 updating_screen = TRUE; |
596 #ifdef FEAT_SYN_HL | 597 #ifdef FEAT_SYN_HL |
597 ++display_tick; /* let syntax code know we're in a next round of | 598 ++display_tick; /* let syntax code know we're in a next round of |
840 screen_cur_row = gui.row; | 841 screen_cur_row = gui.row; |
841 } | 842 } |
842 gui_update_scrollbars(FALSE); | 843 gui_update_scrollbars(FALSE); |
843 } | 844 } |
844 #endif | 845 #endif |
846 return OK; | |
845 } | 847 } |
846 | 848 |
847 #if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL) | 849 #if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL) |
848 /* | 850 /* |
849 * Prepare for updating one or more windows. | 851 * Prepare for updating one or more windows. |