From 1c152e77acb2d449f785fe327f01a06e6c167ec3 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 3 Aug 2023 23:55:19 +0800 Subject: [PATCH] don't execute when executing a macro --- plugin/fcitx.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/fcitx.vim b/plugin/fcitx.vim index b5b34e8..3328b22 100644 --- a/plugin/fcitx.vim +++ b/plugin/fcitx.vim @@ -16,13 +16,13 @@ try " abort on fail exe 'py3file' expand(':r') . '.py' if py3eval('fcitx_loaded') if exists('##InsertLeavePre') - au InsertLeavePre * py3 fcitx2en() + au InsertLeavePre * if reg_executing() == "" | exec "py3 fcitx2en()" | endif else - au InsertLeave * py3 fcitx2en() + au InsertLeave * if reg_executing() == "" | exec "py3 fcitx2en()" | endif endif - au InsertEnter * py3 fcitx2zh() - au CmdlineEnter [/\?] py3 fcitx2zh() - au CmdlineLeave [/\?] py3 fcitx2en() + au InsertEnter * if reg_executing() == "" | exec "py3 fcitx2zh()" | endif + au CmdlineEnter [/\?] if reg_executing() == "" | exec "py3 fcitx2zh()" | endif + au CmdlineLeave [/\?] if reg_executing() == "" | exec "py3 fcitx2en()" | endif endif endtry " ---------------------------------------------------------------------