mirror of
https://github.com/vim/vim.git
synced 2025-10-14 07:04:10 -04:00
patch 8.1.2121: mode is not updated when switching to terminal
Problem: Mode is not updated when switching to terminal in Insert mode. Solution: Redraw the mode when entering a terminal window. (Jason Franklin)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
" Tests for window cmd (:wincmd, :split, :vsplit, :resize and etc...)
|
||||
|
||||
so check.vim
|
||||
|
||||
func Test_window_cmd_ls0_with_split()
|
||||
set ls=0
|
||||
set splitbelow
|
||||
@@ -557,6 +559,33 @@ func Test_access_freed_mem()
|
||||
call assert_equal(&columns, winwidth(0))
|
||||
endfunc
|
||||
|
||||
func Test_insert_cleared_on_switch_to_term()
|
||||
CheckFeature terminal
|
||||
|
||||
set showmode
|
||||
terminal
|
||||
wincmd p
|
||||
|
||||
call feedkeys("i\<C-O>", 'ntx')
|
||||
redraw
|
||||
|
||||
" The "-- (insert) --" indicator should be visible.
|
||||
let chars = map(range(1, &columns), 'nr2char(screenchar(&lines, v:val))')
|
||||
let str = trim(join(chars, ''))
|
||||
call assert_equal('-- (insert) --', str)
|
||||
|
||||
call feedkeys("\<C-W>p", 'ntx')
|
||||
redraw
|
||||
|
||||
" The "-- (insert) --" indicator should have been cleared.
|
||||
let chars = map(range(1, &columns), 'nr2char(screenchar(&lines, v:val))')
|
||||
let str = trim(join(chars, ''))
|
||||
call assert_equal('', str)
|
||||
|
||||
set showmode&
|
||||
%bw!
|
||||
endfunc
|
||||
|
||||
func Test_visual_cleared_after_window_split()
|
||||
new | only!
|
||||
let smd_save = &showmode
|
||||
|
Reference in New Issue
Block a user