Mercurial > vim
annotate src/testdir/test_iminsert.vim @ 16879:3fc7f1139ab4
Added tag v8.1.1440 for changeset 4096722cd9c136fa9f5e65f0b8961ebd547f9b4a
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Jun 2019 17:15:05 +0200 |
parents | 2dcaa860e3fc |
children | 8ae333756614 |
rev | line source |
---|---|
12920
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 source view_util.vim |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 let s:imactivatefunc_called = 0 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 let s:imstatusfunc_called = 0 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 func IM_activatefunc(active) |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let s:imactivatefunc_called = 1 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endfunc |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 func IM_statusfunc() |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 let s:imstatusfunc_called = 1 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 return 0 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 func Test_iminsert2() |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 set imactivatefunc=IM_activatefunc |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 set imstatusfunc=IM_statusfunc |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 set iminsert=2 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 normal! i |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 set iminsert=0 |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 set imactivatefunc= |
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 set imstatusfunc= |
12936
c53a80f39a52
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
Christian Brabandt <cb@256bit.org>
parents:
12930
diff
changeset
|
23 |
c53a80f39a52
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
Christian Brabandt <cb@256bit.org>
parents:
12930
diff
changeset
|
24 let expected = has('gui_running') ? 0 : 1 |
c53a80f39a52
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
Christian Brabandt <cb@256bit.org>
parents:
12930
diff
changeset
|
25 call assert_equal(expected, s:imactivatefunc_called) |
c53a80f39a52
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
Christian Brabandt <cb@256bit.org>
parents:
12930
diff
changeset
|
26 call assert_equal(expected, s:imstatusfunc_called) |
12920
327e1264b9bf
patch 8.0.1336: cannot use imactivatefunc() unless compiled with +xim
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 endfunc |