summaryrefslogtreecommitdiffstats
path: root/src/edit.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/edit.c
parent37badc898b8d167e11553b6d05908ffd35928a6e (diff)
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/edit.c')
-rw-r--r--src/edit.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/edit.c b/src/edit.c
index bf2cf31404..9330a401da 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3451,7 +3451,7 @@ ins_compl_clear(void)
compl_orig_text = NULL;
compl_enter_selects = FALSE;
/* clear v:completed_item */
- set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
+ set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
}
/*
@@ -3553,8 +3553,7 @@ ins_compl_new_leader(void)
{
/* Show the cursor after the match, not after the redrawn text. */
setcursor();
- out_flush();
- gui_update_cursor(FALSE, FALSE);
+ out_flush_cursor(FALSE, FALSE);
}
#endif
compl_restarting = TRUE;
@@ -4704,7 +4703,7 @@ ins_compl_delete(void)
* flicker, thus we can't do that. */
changed_cline_bef_curs();
/* clear v:completed_item */
- set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
+ set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
}
/*
@@ -4724,7 +4723,7 @@ ins_compl_insert(int in_compl_func)
/* Set completed item. */
/* { word, abbr, menu, kind, info } */
- dict = dict_alloc();
+ dict = dict_alloc_lock(VAR_FIXED);
if (dict != NULL)
{
dict_add_nr_str(dict, "word", 0L,
@@ -4936,8 +4935,7 @@ ins_compl_next(
{
/* Show the cursor after the match, not after the redrawn text. */
setcursor();
- out_flush();
- gui_update_cursor(FALSE, FALSE);
+ out_flush_cursor(FALSE, FALSE);
}
#endif