mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:9.0.1195: restoring KeyTyped when building statusline not tested
Problem: Restoring KeyTyped when building statusline not tested.
Solution: Add a test. Clean up and fix other tests. (closes vim/vim#11815)
378e6c03f9
This commit is contained in:
@@ -76,14 +76,46 @@ describe('statusline', function()
|
||||
[1] = {background = Screen.colors.LightGrey}, -- Visual
|
||||
[2] = {bold = true}, -- MoreMsg
|
||||
[3] = {bold = true, reverse = true}, -- StatusLine
|
||||
[5] = {background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue}, -- Folded
|
||||
})
|
||||
exec([[
|
||||
func MyStatusLine()
|
||||
return '%S'
|
||||
endfunc
|
||||
|
||||
set showcmd
|
||||
set laststatus=2
|
||||
set statusline=%S
|
||||
set showcmdloc=statusline
|
||||
call setline(1, ['a', 'b', 'c'])
|
||||
set foldopen+=jump
|
||||
1,2fold
|
||||
3
|
||||
]])
|
||||
|
||||
feed('g')
|
||||
screen:expect([[
|
||||
{5:+-- 2 lines: a···································}|
|
||||
^c |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{3:g }|
|
||||
|
|
||||
]])
|
||||
|
||||
-- typing "gg" should open the fold
|
||||
feed('g')
|
||||
screen:expect([[
|
||||
^a |
|
||||
b |
|
||||
c |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{3: }|
|
||||
|
|
||||
]])
|
||||
|
||||
feed('<C-V>Gl')
|
||||
screen:expect([[
|
||||
{1:a} |
|
||||
@@ -94,6 +126,7 @@ describe('statusline', function()
|
||||
{3:3x2 }|
|
||||
{2:-- VISUAL BLOCK --} |
|
||||
]])
|
||||
|
||||
feed('<Esc>1234')
|
||||
screen:expect([[
|
||||
a |
|
||||
@@ -104,7 +137,10 @@ describe('statusline', function()
|
||||
{3:1234 }|
|
||||
|
|
||||
]])
|
||||
feed('<Esc>:set statusline=<CR>:<CR>1234')
|
||||
|
||||
feed('<Esc>:set statusline=<CR>')
|
||||
feed(':<CR>')
|
||||
feed('1234')
|
||||
screen:expect([[
|
||||
a |
|
||||
b |
|
||||
|
||||
Reference in New Issue
Block a user