Mercurial > vim
comparison src/testdir/test_iminsert.vim @ 12920:327e1264b9bf v8.0.1336
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
commit https://github.com/vim/vim/commit/6315a9ae924d2104b61d1667ea71af3ac7cf48fa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 25 15:20:02 2017 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Nov 2017 15:30:06 +0100 |
parents | |
children | e2612e03d46f |
comparison
equal
deleted
inserted
replaced
12919:ddb76d6af5de | 12920:327e1264b9bf |
---|---|
1 if !has('multi_byte') | |
2 finish | |
3 endif | |
4 | |
5 source view_util.vim | |
6 | |
7 let s:imactivatefunc_called = 0 | |
8 let s:imstatusfunc_called = 0 | |
9 | |
10 func IM_activatefunc(active) | |
11 let s:imactivatefunc_called = 1 | |
12 endfunc | |
13 | |
14 func IM_statusfunc() | |
15 let s:imstatusfunc_called = 1 | |
16 return 0 | |
17 endfunc | |
18 | |
19 func Test_iminsert2() | |
20 set imactivatefunc=IM_activatefunc | |
21 set imstatusfunc=IM_statusfunc | |
22 set iminsert=2 | |
23 normal! i | |
24 set iminsert=0 | |
25 set imactivatefunc= | |
26 set imstatusfunc= | |
27 call assert_equal(1, s:imactivatefunc_called) | |
28 call assert_equal(1, s:imstatusfunc_called) | |
29 endfunc |