forked from aniani/vim
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Problem: Cannot use imactivatefunc() unless compiled with +xim.
Solution: Allow using imactivatefunc() when not compiled with +xim.
(Yasuhiro Matsumoto, closes #2349)
This commit is contained in:
29
src/testdir/test_iminsert.vim
Normal file
29
src/testdir/test_iminsert.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
if !has('multi_byte')
|
||||
finish
|
||||
endif
|
||||
|
||||
source view_util.vim
|
||||
|
||||
let s:imactivatefunc_called = 0
|
||||
let s:imstatusfunc_called = 0
|
||||
|
||||
func IM_activatefunc(active)
|
||||
let s:imactivatefunc_called = 1
|
||||
endfunc
|
||||
|
||||
func IM_statusfunc()
|
||||
let s:imstatusfunc_called = 1
|
||||
return 0
|
||||
endfunc
|
||||
|
||||
func Test_iminsert2()
|
||||
set imactivatefunc=IM_activatefunc
|
||||
set imstatusfunc=IM_statusfunc
|
||||
set iminsert=2
|
||||
normal! i
|
||||
set iminsert=0
|
||||
set imactivatefunc=
|
||||
set imstatusfunc=
|
||||
call assert_equal(1, s:imactivatefunc_called)
|
||||
call assert_equal(1, s:imstatusfunc_called)
|
||||
endfunc
|
||||
Reference in New Issue
Block a user