mirror of
https://github.com/lilydjwg/fcitx.vim.git
synced 2026-02-27 15:36:52 +08:00
Do not run fcitx5-remote in a shell
This commit is contained in:
parent
3554b279a0
commit
67a73dda4f
1 changed files with 4 additions and 4 deletions
|
|
@ -11,19 +11,19 @@ endif
|
||||||
let s:keepcpo = &cpo
|
let s:keepcpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
" If g:fcitx5_remote is set (to the path to `fcitx5-remove`), use it to toggle IME state.
|
" If g:fcitx5_remote is set (to the path to `fcitx5-remote`), use it to toggle IME state.
|
||||||
if exists("g:fcitx5_remote")
|
if exists("g:fcitx5_remote")
|
||||||
function Fcitx2en()
|
function Fcitx2en()
|
||||||
let inputstatus = trim(system(g:fcitx5_remote))
|
let inputstatus = trim(system([g:fcitx5_remote]))
|
||||||
if inputstatus == '2'
|
if inputstatus == '2'
|
||||||
let b:inputtoggle = 1
|
let b:inputtoggle = 1
|
||||||
call system(g:fcitx5_remote . ' -c')
|
call system([g:fcitx5_remote, '-c'])
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
function Fcitx2zh()
|
function Fcitx2zh()
|
||||||
try
|
try
|
||||||
if b:inputtoggle == 1
|
if b:inputtoggle == 1
|
||||||
call system(g:fcitx5_remote . ' -o')
|
call system([g:fcitx5_remote, '-o'])
|
||||||
let b:inputtoggle = 0
|
let b:inputtoggle = 0
|
||||||
endif
|
endif
|
||||||
catch /inputtoggle/
|
catch /inputtoggle/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue