comparison src/screen.c @ 13888:81e8e6181aeb v8.0.1815

patch 8.0.1815: crash with terminal window and with 'lazyredraw' set commit https://github.com/vim/vim/commit/0cb8ac71ae42f66d525ad855db01361ca38d935a Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 11 22:01:51 2018 +0200 patch 8.0.1815: crash with terminal window and with 'lazyredraw' set Problem: Still a crash with terminal window and with 'lazyredraw' set. (Antoine) Solution: Do not wipe out the buffer when updating the screen.
author Christian Brabandt <cb@256bit.org>
date Fri, 11 May 2018 22:15:06 +0200
parents 156ebdcb8ef5
children d111462e0173
comparison
equal deleted inserted replaced
13887:f5a2d0eb9926 13888:81e8e6181aeb
512 curwin->w_lines[i].wl_valid = FALSE; 512 curwin->w_lines[i].wl_valid = FALSE;
513 } 513 }
514 #endif 514 #endif
515 } 515 }
516 516
517 void
518 reset_updating_screen(int may_resize_shell UNUSED)
519 {
520 updating_screen = FALSE;
521 #ifdef FEAT_GUI
522 if (may_resize_shell)
523 gui_may_resize_shell();
524 #endif
525 #ifdef FEAT_TERMINAL
526 term_check_channel_closed_recently();
527 #endif
528 }
529
517 /* 530 /*
518 * Update all windows that are editing the current buffer. 531 * Update all windows that are editing the current buffer.
519 */ 532 */
520 void 533 void
521 update_curbuf(int type) 534 update_curbuf(int type)
776 /* Reset b_mod_set flags. Going through all windows is probably faster 789 /* Reset b_mod_set flags. Going through all windows is probably faster
777 * than going through all buffers (there could be many buffers). */ 790 * than going through all buffers (there could be many buffers). */
778 FOR_ALL_WINDOWS(wp) 791 FOR_ALL_WINDOWS(wp)
779 wp->w_buffer->b_mod_set = FALSE; 792 wp->w_buffer->b_mod_set = FALSE;
780 793
781 updating_screen = FALSE; 794 reset_updating_screen(TRUE);
782 #ifdef FEAT_GUI
783 gui_may_resize_shell();
784 #endif
785 795
786 /* Clear or redraw the command line. Done last, because scrolling may 796 /* Clear or redraw the command line. Done last, because scrolling may
787 * mess up the command line. */ 797 * mess up the command line. */
788 if (clear_cmdline || redraw_cmdline) 798 if (clear_cmdline || redraw_cmdline)
789 showmode(); 799 showmode();
859 869
860 # ifdef FEAT_SEARCH_EXTRA 870 # ifdef FEAT_SEARCH_EXTRA
861 end_search_hl(); 871 end_search_hl();
862 # endif 872 # endif
863 873
864 updating_screen = FALSE; 874 reset_updating_screen(TRUE);
865 875
866 # ifdef FEAT_GUI 876 # ifdef FEAT_GUI
867 gui_may_resize_shell();
868
869 /* Redraw the cursor and update the scrollbars when all screen updating is 877 /* Redraw the cursor and update the scrollbars when all screen updating is
870 * done. */ 878 * done. */
871 if (gui.in_use) 879 if (gui.in_use)
872 { 880 {
873 out_flush_cursor(FALSE, FALSE); 881 out_flush_cursor(FALSE, FALSE);