annotate src/testdir/test_iminsert.vim @ 17437:5f71f12bdb8c

Added tag v8.1.1716 for changeset e1b5c15f5fee70aaa68aa8286030cf713a403aee
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jul 2019 23:30:05 +0200
parents 2dcaa860e3fc
children 8ae333756614
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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