diff --git a/plugin/fcitx.vim b/plugin/fcitx.vim index 779ba13..e63e5cb 100644 --- a/plugin/fcitx.vim +++ b/plugin/fcitx.vim @@ -15,7 +15,11 @@ let g:loaded_fcitx = 1 try " abort on fail exe 'py3file' expand(':r') . '.py' if py3eval('fcitx_loaded') - au InsertLeavePre * py3 fcitx2en() + if exists('##InsertLeavePre') + au InsertLeavePre * py3 fcitx2en() + else + au InsertLeave * py3 fcitx2en() + endif au InsertEnter * py3 fcitx2zh() endif endtry