mirror of
https://github.com/lilydjwg/fcitx.vim.git
synced 2025-12-27 02:24:57 +08:00
support for earlier Vim that doesn't have InsertLeavePre
This commit is contained in:
parent
1efd21b9aa
commit
c038116610
1 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,11 @@ let g:loaded_fcitx = 1
|
|||
try " abort on fail
|
||||
exe 'py3file' expand('<sfile>: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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue