summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-01-31 20:51:47 +0100
committerBram Moolenaar <Bram@vim.org>2018-01-31 20:51:47 +0100
commita338adcf222b6a24e26ea5ae6a2ad27f914acb38 (patch)
tree0ffe28d0a3a60c2c1444a991514505c448d4335b /src/ui.c
parent37badc898b8d167e11553b6d05908ffd35928a6e (diff)
downloadvim-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/ui.c')
-rw-r--r--src/ui.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ui.c b/src/ui.c
index e410f6829..c77a8e029 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -245,7 +245,7 @@ ui_wait_for_chars_or_timer(
if (interrupted != NULL && *interrupted)
/* Nothing available, but need to return so that side effects get
* handled, such as handling a message on a channel. */
- return FALSE;
+ return FAIL;
if (wtime > 0)
remaining -= due_time;
}
@@ -578,11 +578,7 @@ clip_lose_selection(VimClipboard *cbd)
update_curbuf(INVERTED_ALL);
setcursor();
cursor_on();
- out_flush();
-# ifdef FEAT_GUI
- if (gui.in_use)
- gui_update_cursor(TRUE, FALSE);
-# endif
+ out_flush_cursor(TRUE, FALSE);
}
}
#endif
@@ -3331,13 +3327,10 @@ ui_focus_change(
setcursor();
}
cursor_on(); /* redrawing may have switched it off */
- out_flush();
+ out_flush_cursor(FALSE, TRUE);
# ifdef FEAT_GUI
if (gui.in_use)
- {
- gui_update_cursor(FALSE, TRUE);
gui_update_scrollbars(FALSE);
- }
# endif
}
#ifdef FEAT_TITLE