diff options
author | Milly <milly.ca@gmail.com> | 2022-05-26 13:16:25 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-26 13:16:25 +0100 |
commit | c7e54efe4dc2bd8fd86feb4a26b4485b7b4c8578 (patch) | |
tree | e47bd61af75370460f507181272624fce3d7f7ca /src/gui_xim.c | |
parent | 0f7a3e1de6f71e8e1423fe594890d6aa7f94e132 (diff) |
patch 8.2.5020: using 'imstatusfunc' and 'imactivatefunc' breaks 'foldopen'v8.2.5020
Problem: Using 'imstatusfunc' and 'imactivatefunc' breaks 'foldopen'.
Solution: Save and restore the KeyTyped flag. (closes #10479)
Diffstat (limited to 'src/gui_xim.c')
-rw-r--r-- | src/gui_xim.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui_xim.c b/src/gui_xim.c index 9f3181e769..4d8706a100 100644 --- a/src/gui_xim.c +++ b/src/gui_xim.c @@ -89,17 +89,21 @@ set_imstatusfunc_option(void) call_imactivatefunc(int active) { typval_T argv[2]; + int save_KeyTyped = KeyTyped; argv[0].v_type = VAR_NUMBER; argv[0].vval.v_number = active ? 1 : 0; argv[1].v_type = VAR_UNKNOWN; (void)call_callback_retnr(&imaf_cb, 1, argv); + + KeyTyped = save_KeyTyped; } static int call_imstatusfunc(void) { int is_active; + int save_KeyTyped = KeyTyped; // FIXME: Don't execute user function in unsafe situation. if (exiting || is_autocmd_blocked()) @@ -109,6 +113,8 @@ call_imstatusfunc(void) ++msg_silent; is_active = call_callback_retnr(&imsf_cb, 0, NULL); --msg_silent; + + KeyTyped = save_KeyTyped; return (is_active > 0); } #endif |