Mercurial > vim
view src/testdir/test_iminsert.vim @ 18744:b29d8a06e72c v8.1.2362
patch 8.1.2362: cannot place signs in a popup window
Commit: https://github.com/vim/vim/commit/7257073043252c2e01c8e168e6842a1121797243
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 30 14:21:53 2019 +0100
patch 8.1.2362: cannot place signs in a popup window
Problem: Cannot place signs in a popup window. (Maxim Kim)
Solution: Use the group prefix "PopUp" to specify which signs should show up
in a popup window. (closes #5277)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Nov 2019 14:30:05 +0100 |
parents | 8ae333756614 |
children | 67eb9bc32434 |
line wrap: on
line source
source view_util.vim let s:imactivatefunc_called = 0 let s:imstatusfunc_called = 0 let s:imstatus_active = 0 func IM_activatefunc(active) let s:imactivatefunc_called = 1 let s:imstatus_active = a:active endfunc func IM_statusfunc() let s:imstatusfunc_called = 1 return s:imstatus_active endfunc func Test_iminsert2() let s:imactivatefunc_called = 0 let s:imstatusfunc_called = 0 set imactivatefunc=IM_activatefunc set imstatusfunc=IM_statusfunc set iminsert=2 normal! i set iminsert=0 set imactivatefunc= set imstatusfunc= let expected = has('gui_running') ? 0 : 1 call assert_equal(expected, s:imactivatefunc_called) call assert_equal(expected, s:imstatusfunc_called) endfunc func Test_imgetstatus() if has('gui_running') if !has('win32') throw 'Skipped: running in the GUI, only works on MS-Windows' endif set imactivatefunc= set imstatusfunc= else set imactivatefunc=IM_activatefunc set imstatusfunc=IM_statusfunc let s:imstatus_active = 0 endif new set iminsert=2 call feedkeys("i\<C-R>=getimstatus()\<CR>\<ESC>", 'nx') call assert_equal('1', getline(1)) set iminsert=0 call feedkeys("o\<C-R>=getimstatus()\<CR>\<ESC>", 'nx') call assert_equal('0', getline(2)) bw! set imactivatefunc= set imstatusfunc= endfunc