comparison src/ui.c @ 13150:808625d4b71b v8.0.1449

patch 8.0.1449: slow redrawing with DirectX commit https://github.com/vim/vim/commit/a338adcf222b6a24e26ea5ae6a2ad27f914acb38 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 31 20:51:47 2018 +0100 patch 8.0.1449: slow redrawing with DirectX Problem: Slow redrawing with DirectX. Solution: Avoid calling gui_mch_flush() unnecessarily, especially when updating the cursor. (Ken Takata, closes #2560)
author Christian Brabandt <cb@256bit.org>
date Wed, 31 Jan 2018 21:00:08 +0100
parents 1bdc12630fc0
children ac42c4b11dbc
comparison
equal deleted inserted replaced
13149:46794b7ab97a 13150:808625d4b71b
243 if (wait_func(due_time, interrupted, ignore_input)) 243 if (wait_func(due_time, interrupted, ignore_input))
244 return OK; 244 return OK;
245 if (interrupted != NULL && *interrupted) 245 if (interrupted != NULL && *interrupted)
246 /* Nothing available, but need to return so that side effects get 246 /* Nothing available, but need to return so that side effects get
247 * handled, such as handling a message on a channel. */ 247 * handled, such as handling a message on a channel. */
248 return FALSE; 248 return FAIL;
249 if (wtime > 0) 249 if (wtime > 0)
250 remaining -= due_time; 250 remaining -= due_time;
251 } 251 }
252 return FAIL; 252 return FAIL;
253 } 253 }
576 && HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC)) 576 && HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC))
577 { 577 {
578 update_curbuf(INVERTED_ALL); 578 update_curbuf(INVERTED_ALL);
579 setcursor(); 579 setcursor();
580 cursor_on(); 580 cursor_on();
581 out_flush(); 581 out_flush_cursor(TRUE, FALSE);
582 # ifdef FEAT_GUI
583 if (gui.in_use)
584 gui_update_cursor(TRUE, FALSE);
585 # endif
586 } 582 }
587 } 583 }
588 #endif 584 #endif
589 } 585 }
590 586
3329 if (must_redraw != 0) 3325 if (must_redraw != 0)
3330 update_screen(0); 3326 update_screen(0);
3331 setcursor(); 3327 setcursor();
3332 } 3328 }
3333 cursor_on(); /* redrawing may have switched it off */ 3329 cursor_on(); /* redrawing may have switched it off */
3334 out_flush(); 3330 out_flush_cursor(FALSE, TRUE);
3335 # ifdef FEAT_GUI 3331 # ifdef FEAT_GUI
3336 if (gui.in_use) 3332 if (gui.in_use)
3337 {
3338 gui_update_cursor(FALSE, TRUE);
3339 gui_update_scrollbars(FALSE); 3333 gui_update_scrollbars(FALSE);
3340 }
3341 # endif 3334 # endif
3342 } 3335 }
3343 #ifdef FEAT_TITLE 3336 #ifdef FEAT_TITLE
3344 /* File may have been changed from 'readonly' to 'noreadonly' */ 3337 /* File may have been changed from 'readonly' to 'noreadonly' */
3345 if (need_maketitle) 3338 if (need_maketitle)