mirror of
https://github.com/lilydjwg/fcitx.vim.git
synced 2026-01-07 11:27:23 +08:00
support for earlier Vim that doesn't have InsertLeavePre
This commit is contained in:
parent
dc9a01822d
commit
6e53d15569
1 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,11 @@ let g:loaded_fcitx = 1
|
||||||
try " abort on fail
|
try " abort on fail
|
||||||
exe 'py3file' expand('<sfile>:r') . '.py'
|
exe 'py3file' expand('<sfile>:r') . '.py'
|
||||||
if py3eval('fcitx_loaded')
|
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()
|
au InsertEnter * py3 fcitx2zh()
|
||||||
endif
|
endif
|
||||||
endtry
|
endtry
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue