mirror of
https://github.com/neovim/neovim.git
synced 2025-11-22 10:06:33 +00:00
vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)
Problem: Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike
closes: vim/vim#13569
d1c3ef1f47
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
-- Cmdline-mode tests.
|
||||
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local clear, insert, funcs, eq, feed =
|
||||
helpers.clear, helpers.insert, helpers.funcs, helpers.eq, helpers.feed
|
||||
local eval = helpers.eval
|
||||
local command = helpers.command
|
||||
local meths = helpers.meths
|
||||
|
||||
describe('cmdline', function()
|
||||
@@ -43,6 +45,30 @@ describe('cmdline', function()
|
||||
eq('"<C-J><C-@><C-[><C-S-M><M-C-I><C-D-J>', eval('@:'))
|
||||
end)
|
||||
|
||||
it('redraws statusline when toggling overstrike', function()
|
||||
local screen = Screen.new(60, 4)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
|
||||
[1] = {reverse = true, bold = true}, -- StatusLine
|
||||
})
|
||||
screen:attach()
|
||||
command('set laststatus=2 statusline=%!mode(1)')
|
||||
feed(':')
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{1:c }|
|
||||
:^ |
|
||||
]]}
|
||||
feed('<Insert>')
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{1:cr }|
|
||||
:^ |
|
||||
]]}
|
||||
end)
|
||||
|
||||
describe('history', function()
|
||||
it('correctly clears start of the history', function()
|
||||
-- Regression test: check absence of the memory leak when clearing start of
|
||||
|
||||
Reference in New Issue
Block a user