diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-20 14:07:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-20 14:07:00 +0100 |
commit | 79cdf026f1b8a16298ee73be497c4bd5f3458cde (patch) | |
tree | 2f2381a497126df7030b96450b1b1bfd4257c487 /src/insexpand.c | |
parent | bf63011a52a3cc32609ae5945665875062a5ae50 (diff) |
patch 9.0.1571: RedrawingDisabled not used consistentlyv9.0.1571
Problem: RedrawingDisabled not used consistently.
Solution: Avoid RedrawingDisabled going negative. Set RedrawingDisabled in
win_split_ins(). (closes #11961)
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index c20cb4f258..3cfdface44 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -2969,12 +2969,13 @@ f_complete_add(typval_T *argvars, typval_T *rettv) void f_complete_check(typval_T *argvars UNUSED, typval_T *rettv) { - int saved = RedrawingDisabled; - + int save_RedrawingDisabled = RedrawingDisabled; RedrawingDisabled = 0; + ins_compl_check_keys(0, TRUE); rettv->vval.v_number = ins_compl_interrupted(); - RedrawingDisabled = saved; + + RedrawingDisabled = save_RedrawingDisabled; } /* @@ -5079,8 +5080,7 @@ ins_complete(int c, int enable_pum) show_pum(int prev_w_wrow, int prev_w_leftcol) { // RedrawingDisabled may be set when invoked through complete(). - int n = RedrawingDisabled; - + int save_RedrawingDisabled = RedrawingDisabled; RedrawingDisabled = 0; // If the cursor moved or the display scrolled we need to remove the pum @@ -5091,7 +5091,8 @@ show_pum(int prev_w_wrow, int prev_w_leftcol) ins_compl_show_pum(); setcursor(); - RedrawingDisabled = n; + + RedrawingDisabled = save_RedrawingDisabled; } /* |