diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-25 15:20:02 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-25 15:20:02 +0100 |
commit | 6315a9ae924d2104b61d1667ea71af3ac7cf48fa (patch) | |
tree | de56592e8f6642707a93414b79c66586faea052d /src/testdir/test_iminsert.vim | |
parent | 291a9d15ed1eb1094edc8ad6dda00a6da3bd7072 (diff) | |
download | vim-git-6315a9ae924d2104b61d1667ea71af3ac7cf48fa.tar.gz |
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +ximv8.0.1336
Problem: Cannot use imactivatefunc() unless compiled with +xim.
Solution: Allow using imactivatefunc() when not compiled with +xim.
(Yasuhiro Matsumoto, closes #2349)
Diffstat (limited to 'src/testdir/test_iminsert.vim')
-rw-r--r-- | src/testdir/test_iminsert.vim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/test_iminsert.vim b/src/testdir/test_iminsert.vim new file mode 100644 index 000000000..603135af2 --- /dev/null +++ b/src/testdir/test_iminsert.vim @@ -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 |