comparison src/netbeans.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 1a450ce6980c
children 6559e98f3e74
comparison
equal deleted inserted replaced
13149:46794b7ab97a 13150:808625d4b71b
119 coloncmd(":sign unplace *"); 119 coloncmd(":sign unplace *");
120 changed_window_setting(); 120 changed_window_setting();
121 update_screen(CLEAR); 121 update_screen(CLEAR);
122 setcursor(); 122 setcursor();
123 cursor_on(); 123 cursor_on();
124 out_flush(); 124 out_flush_cursor(TRUE, FALSE);
125 #ifdef FEAT_GUI
126 if (gui.in_use)
127 {
128 gui_update_cursor(TRUE, FALSE);
129 gui_mch_flush();
130 }
131 #endif
132 } 125 }
133 126
134 #define NB_DEF_HOST "localhost" 127 #define NB_DEF_HOST "localhost"
135 #define NB_DEF_ADDR "3219" 128 #define NB_DEF_ADDR "3219"
136 #define NB_DEF_PASS "changeme" 129 #define NB_DEF_PASS "changeme"
1846 /* update_curbuf(NOT_VALID); */ 1839 /* update_curbuf(NOT_VALID); */
1847 update_topline(); /* scroll to show the line */ 1840 update_topline(); /* scroll to show the line */
1848 update_screen(VALID); 1841 update_screen(VALID);
1849 setcursor(); 1842 setcursor();
1850 cursor_on(); 1843 cursor_on();
1851 out_flush(); 1844 out_flush_cursor(TRUE, FALSE);
1852 #ifdef FEAT_GUI 1845
1853 if (gui.in_use)
1854 {
1855 gui_update_cursor(TRUE, FALSE);
1856 gui_mch_flush();
1857 }
1858 #endif
1859 /* Quit a hit-return or more prompt. */ 1846 /* Quit a hit-return or more prompt. */
1860 if (State == HITRETURN || State == ASKMORE) 1847 if (State == HITRETURN || State == ASKMORE)
1861 { 1848 {
1862 #ifdef FEAT_GUI_GTK 1849 #ifdef FEAT_GUI_GTK
1863 if (gui.in_use && gtk_main_level() > 0) 1850 if (gui.in_use && gtk_main_level() > 0)
2246 if (buf != NULL && buf->initDone && do_update) 2233 if (buf != NULL && buf->initDone && do_update)
2247 { 2234 {
2248 update_screen(NOT_VALID); 2235 update_screen(NOT_VALID);
2249 setcursor(); 2236 setcursor();
2250 cursor_on(); 2237 cursor_on();
2251 out_flush(); 2238 out_flush_cursor(TRUE, FALSE);
2252 #ifdef FEAT_GUI 2239
2253 if (gui.in_use)
2254 {
2255 gui_update_cursor(TRUE, FALSE);
2256 gui_mch_flush();
2257 }
2258 #endif
2259 /* Quit a hit-return or more prompt. */ 2240 /* Quit a hit-return or more prompt. */
2260 if (State == HITRETURN || State == ASKMORE) 2241 if (State == HITRETURN || State == ASKMORE)
2261 { 2242 {
2262 #ifdef FEAT_GUI_GTK 2243 #ifdef FEAT_GUI_GTK
2263 if (gui.in_use && gtk_main_level() > 0) 2244 if (gui.in_use && gtk_main_level() > 0)
2305 /* ALT_INPUT_LOCK_ON; */ 2286 /* ALT_INPUT_LOCK_ON; */
2306 do_cmdline((char_u *)buf, NULL, NULL, DOCMD_NOWAIT | DOCMD_KEYTYPED); 2287 do_cmdline((char_u *)buf, NULL, NULL, DOCMD_NOWAIT | DOCMD_KEYTYPED);
2307 /* ALT_INPUT_LOCK_OFF; */ 2288 /* ALT_INPUT_LOCK_OFF; */
2308 2289
2309 setcursor(); /* restore the cursor position */ 2290 setcursor(); /* restore the cursor position */
2310 out_flush(); /* make sure output has been written */ 2291 out_flush_cursor(TRUE, FALSE);
2311
2312 #ifdef FEAT_GUI
2313 if (gui.in_use)
2314 {
2315 gui_update_cursor(TRUE, FALSE);
2316 gui_mch_flush();
2317 }
2318 #endif
2319 } 2292 }
2320 2293
2321 2294
2322 /* 2295 /*
2323 * Parse the specialKeys argument and issue the appropriate map commands. 2296 * Parse the specialKeys argument and issue the appropriate map commands.
2567 /* update the screen after having added the gutter */ 2540 /* update the screen after having added the gutter */
2568 changed_window_setting(); 2541 changed_window_setting();
2569 update_screen(CLEAR); 2542 update_screen(CLEAR);
2570 setcursor(); 2543 setcursor();
2571 cursor_on(); 2544 cursor_on();
2572 out_flush(); 2545 out_flush_cursor(TRUE, FALSE);
2573 #ifdef FEAT_GUI
2574 if (gui.in_use)
2575 {
2576 gui_update_cursor(TRUE, FALSE);
2577 gui_mch_flush();
2578 }
2579 #endif
2580 } 2546 }
2581 2547
2582 /* 2548 /*
2583 * Tell netbeans that we're exiting. This should be called right 2549 * Tell netbeans that we're exiting. This should be called right
2584 * before calling exit. 2550 * before calling exit.