Mercurial > vim
view src/testdir/test_iminsert.vim @ 20673:0ebd431a2256 v8.2.0890
patch 8.2.0890: no color in terminal window when 'termguicolor' is set
Commit: https://github.com/vim/vim/commit/1e5f8f6d65b2ecff3d93d9fdbdd17c7a2ab9cc3d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 2 23:18:24 2020 +0200
patch 8.2.0890: no color in terminal window when 'termguicolor' is set
Problem: No color in terminal window when 'termguicolor' is set.
Solution: Clear the underline color. (closes https://github.com/vim/vim/issues/6186)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 02 Jun 2020 23:30:04 +0200 |
parents | f70a3c1000bb |
children | 505d97ea54da |
line wrap: on
line source
source view_util.vim source check.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_getimstatus() if has('win32') CheckFeature multi_byte_ime elseif !has('gui_mac') CheckFeature xim endif 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 " Test for using an lmap in insert mode func Test_lmap_in_insert_mode() new call setline(1, 'abc') lmap { w set iminsert=1 call feedkeys('r{', 'xt') call assert_equal('wbc', getline(1)) set iminsert=2 call feedkeys('$r{', 'xt') call assert_equal('wb{', getline(1)) call setline(1, 'vim web') set iminsert=1 call feedkeys('0f{', 'xt') call assert_equal(5, col('.')) set iminsert& lunmap { close! endfunc " vim: shiftwidth=2 sts=2 expandtab