diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-01-31 20:51:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-01-31 20:51:47 +0100 |
commit | a338adcf222b6a24e26ea5ae6a2ad27f914acb38 (patch) | |
tree | 0ffe28d0a3a60c2c1444a991514505c448d4335b /src/netbeans.c | |
parent | 37badc898b8d167e11553b6d05908ffd35928a6e (diff) | |
download | vim-git-a338adcf222b6a24e26ea5ae6a2ad27f914acb38.tar.gz |
patch 8.0.1449: slow redrawing with DirectXv8.0.1449
Problem: Slow redrawing with DirectX.
Solution: Avoid calling gui_mch_flush() unnecessarily, especially when
updating the cursor. (Ken Takata, closes #2560)
Diffstat (limited to 'src/netbeans.c')
-rw-r--r-- | src/netbeans.c | 48 |
1 files changed, 7 insertions, 41 deletions
diff --git a/src/netbeans.c b/src/netbeans.c index f4b42dc8a..c906d2891 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -121,14 +121,7 @@ netbeans_close(void) update_screen(CLEAR); setcursor(); cursor_on(); - out_flush(); -#ifdef FEAT_GUI - if (gui.in_use) - { - gui_update_cursor(TRUE, FALSE); - gui_mch_flush(); - } -#endif + out_flush_cursor(TRUE, FALSE); } #define NB_DEF_HOST "localhost" @@ -1848,14 +1841,8 @@ nb_do_cmd( update_screen(VALID); setcursor(); cursor_on(); - out_flush(); -#ifdef FEAT_GUI - if (gui.in_use) - { - gui_update_cursor(TRUE, FALSE); - gui_mch_flush(); - } -#endif + out_flush_cursor(TRUE, FALSE); + /* Quit a hit-return or more prompt. */ if (State == HITRETURN || State == ASKMORE) { @@ -2248,14 +2235,8 @@ nb_do_cmd( update_screen(NOT_VALID); setcursor(); cursor_on(); - out_flush(); -#ifdef FEAT_GUI - if (gui.in_use) - { - gui_update_cursor(TRUE, FALSE); - gui_mch_flush(); - } -#endif + out_flush_cursor(TRUE, FALSE); + /* Quit a hit-return or more prompt. */ if (State == HITRETURN || State == ASKMORE) { @@ -2307,15 +2288,7 @@ coloncmd(char *cmd, ...) /* ALT_INPUT_LOCK_OFF; */ setcursor(); /* restore the cursor position */ - out_flush(); /* make sure output has been written */ - -#ifdef FEAT_GUI - if (gui.in_use) - { - gui_update_cursor(TRUE, FALSE); - gui_mch_flush(); - } -#endif + out_flush_cursor(TRUE, FALSE); } @@ -2569,14 +2542,7 @@ netbeans_open(char *params, int doabort) update_screen(CLEAR); setcursor(); cursor_on(); - out_flush(); -#ifdef FEAT_GUI - if (gui.in_use) - { - gui_update_cursor(TRUE, FALSE); - gui_mch_flush(); - } -#endif + out_flush_cursor(TRUE, FALSE); } /* |