mirror of
https://github.com/lilydjwg/fcitx.vim.git
synced 2025-12-28 03:15:08 +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
|
||||
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")
|
||||
function Fcitx2en()
|
||||
let inputstatus = trim(system(g:fcitx5_remote))
|
||||
let inputstatus = trim(system([g:fcitx5_remote]))
|
||||
if inputstatus == '2'
|
||||
let b:inputtoggle = 1
|
||||
call system(g:fcitx5_remote . ' -c')
|
||||
call system([g:fcitx5_remote, '-c'])
|
||||
endif
|
||||
endfunction
|
||||
function Fcitx2zh()
|
||||
try
|
||||
if b:inputtoggle == 1
|
||||
call system(g:fcitx5_remote . ' -o')
|
||||
call system([g:fcitx5_remote, '-o'])
|
||||
let b:inputtoggle = 0
|
||||
endif
|
||||
catch /inputtoggle/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue