mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
vim-patch:9.0.0086: tabline is not redrawn when entering command line
Problem: Tabline is not redrawn when entering command line.
Solution: Set "redraw_tabline". (closes vim/vim#10771)
6791adca53
This commit is contained in:
@@ -880,6 +880,12 @@ static uint8_t *command_line_enter(int firstc, long count, int indent, bool init
|
||||
found_one = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (*p_tal != NUL) {
|
||||
redraw_tabline = true;
|
||||
found_one = true;
|
||||
}
|
||||
|
||||
if (found_one) {
|
||||
redraw_statuslines();
|
||||
}
|
||||
|
@@ -1846,4 +1846,20 @@ func Test_long_error_message()
|
||||
silent! norm Q00000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
endfunc
|
||||
|
||||
func Test_cmdline_redraw_tabline()
|
||||
CheckRunVimInTerminal
|
||||
|
||||
let lines =<< trim END
|
||||
set showtabline=2
|
||||
autocmd CmdlineEnter * set tabline=foo
|
||||
END
|
||||
call writefile(lines, 'Xcmdline_redraw_tabline')
|
||||
let buf = RunVimInTerminal('-S Xcmdline_redraw_tabline', #{rows: 6})
|
||||
call term_sendkeys(buf, ':')
|
||||
call WaitForAssert({-> assert_match('^foo', term_getline(buf, 1))})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xcmdline_redraw_tabline')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@@ -3,11 +3,12 @@ local Screen = require('test.functional.ui.screen')
|
||||
local clear = helpers.clear
|
||||
local feed = helpers.feed
|
||||
local feed_command = helpers.feed_command
|
||||
local source = helpers.source
|
||||
local exec = helpers.exec
|
||||
|
||||
describe('cmdline', function()
|
||||
before_each(clear)
|
||||
|
||||
-- oldtest: Test_cmdlineclear_tabenter()
|
||||
it('is cleared when switching tabs', function()
|
||||
local screen = Screen.new(30, 10)
|
||||
screen:attach()
|
||||
@@ -91,10 +92,11 @@ describe('cmdline', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_verbose_option()
|
||||
it('prints every executed Ex command if verbose >= 16', function()
|
||||
local screen = Screen.new(60, 12)
|
||||
screen:attach()
|
||||
source([[
|
||||
exec([[
|
||||
command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v
|
||||
call feedkeys("\r", 't') " for the hit-enter prompt
|
||||
set verbose=20
|
||||
@@ -115,4 +117,27 @@ describe('cmdline', function()
|
||||
Press ENTER or type command to continue^ |
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_cmdline_redraw_tabline()
|
||||
it('tabline is redrawn on entering cmdline', function()
|
||||
local screen = Screen.new(30, 6)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
|
||||
[1] = {reverse = true}, -- TabLineFill
|
||||
})
|
||||
screen:attach()
|
||||
exec([[
|
||||
set showtabline=2
|
||||
autocmd CmdlineEnter * set tabline=foo
|
||||
]])
|
||||
feed(':')
|
||||
screen:expect([[
|
||||
{1:foo }|
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
:^ |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user