aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/cmdline_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-27 06:26:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-27 06:32:40 +0800
commitfc55f8263c6c8d8851fa2b6290083a64da1ebd28 (patch)
treeda96e28622a4caf0a304f1827439b01a88829778 /test/functional/legacy/cmdline_spec.lua
parent0c0a2e4e526109c6fcd44618e199b36927dff0ff (diff)
downloadrneovim-fc55f8263c6c8d8851fa2b6290083a64da1ebd28.tar.gz
rneovim-fc55f8263c6c8d8851fa2b6290083a64da1ebd28.tar.bz2
rneovim-fc55f8263c6c8d8851fa2b6290083a64da1ebd28.zip
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) https://github.com/vim/vim/commit/6791adca53981666f0cf23e264e102b795224044
Diffstat (limited to 'test/functional/legacy/cmdline_spec.lua')
-rw-r--r--test/functional/legacy/cmdline_spec.lua29
1 files changed, 27 insertions, 2 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua
index d8d849271b..cf02636890 100644
--- a/test/functional/legacy/cmdline_spec.lua
+++ b/test/functional/legacy/cmdline_spec.lua
@@ -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)