Mercurial > vim
comparison src/testdir/test_iminsert.vim @ 12936:c53a80f39a52 v8.0.1344
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
commit https://github.com/vim/vim/commit/2877d334ad1321d1fcd5f903c0493bd0cdd787f8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 26 14:56:16 2017 +0100
patch 8.0.1344: using 'imactivatefunc' in the GUI does not work
Problem: Using 'imactivatefunc' in the GUI does not work.
Solution: Do not use 'imactivatefunc' and 'imstatusfunc' in the GUI.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 26 Nov 2017 15:00:06 +0100 |
parents | e2612e03d46f |
children | 2dcaa860e3fc |
comparison
equal
deleted
inserted
replaced
12935:e952feb15951 | 12936:c53a80f39a52 |
---|---|
15 let s:imstatusfunc_called = 1 | 15 let s:imstatusfunc_called = 1 |
16 return 0 | 16 return 0 |
17 endfunc | 17 endfunc |
18 | 18 |
19 func Test_iminsert2() | 19 func Test_iminsert2() |
20 if has('gui_win32') | |
21 return | |
22 endif | |
23 set imactivatefunc=IM_activatefunc | 20 set imactivatefunc=IM_activatefunc |
24 set imstatusfunc=IM_statusfunc | 21 set imstatusfunc=IM_statusfunc |
25 set iminsert=2 | 22 set iminsert=2 |
26 normal! i | 23 normal! i |
27 set iminsert=0 | 24 set iminsert=0 |
28 set imactivatefunc= | 25 set imactivatefunc= |
29 set imstatusfunc= | 26 set imstatusfunc= |
30 call assert_equal(1, s:imactivatefunc_called) | 27 |
31 call assert_equal(1, s:imstatusfunc_called) | 28 let expected = has('gui_running') ? 0 : 1 |
29 call assert_equal(expected, s:imactivatefunc_called) | |
30 call assert_equal(expected, s:imstatusfunc_called) | |
32 endfunc | 31 endfunc |