aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorshadmansaleh <13149513+shadmansaleh@users.noreply.github.com>2022-10-22 13:54:29 +0600
committershadmansaleh <13149513+shadmansaleh@users.noreply.github.com>2022-10-24 21:14:41 +0600
commita53998ae78902309c225b323e0b8d9f1f75fe147 (patch)
tree4c019f10ec043613512d9623fa7c68ecd2f28043 /test/functional
parent837190720310deca0231fc42aa3023957ff79a3a (diff)
downloadrneovim-a53998ae78902309c225b323e0b8d9f1f75fe147.tar.gz
rneovim-a53998ae78902309c225b323e0b8d9f1f75fe147.tar.bz2
rneovim-a53998ae78902309c225b323e0b8d9f1f75fe147.zip
fix: setting tabline option not redrawing tabline
With #20374 tabline option is marked with 'statuslines' redraw flag. But 'statuslines' doesn't redraw tabline. As a result, tabline doesn't get redrawn when tabline option is set and statuslines get unnecessarily redrawn. This patch fixes the issue by adding a new redraw flag P_RTABL to redraw tabline.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/tabline_spec.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/ui/tabline_spec.lua b/test/functional/ui/tabline_spec.lua
index 809486d4db..0e35a03557 100644
--- a/test/functional/ui/tabline_spec.lua
+++ b/test/functional/ui/tabline_spec.lua
@@ -84,3 +84,39 @@ describe('ui/ext_tabline', function()
end}
end)
end)
+
+describe("tabline", function()
+ local screen
+
+ before_each(function()
+ clear()
+ screen = Screen.new(42, 5)
+ screen:attach()
+ end)
+
+ it('redraws when tabline option is set', function()
+ command('set tabline=asdf')
+ command('set showtabline=2')
+ screen:expect{grid=[[
+ {1:asdf }|
+ ^ |
+ {2:~ }|
+ {2:~ }|
+ |
+ ]], attr_ids={
+ [1] = {reverse = true};
+ [2] = {bold = true, foreground = Screen.colors.Blue1};
+ }}
+ command('set tabline=jkl')
+ screen:expect{grid=[[
+ {1:jkl }|
+ ^ |
+ {2:~ }|
+ {2:~ }|
+ |
+ ]], attr_ids={
+ [1] = {reverse = true};
+ [2] = {bold = true, foreground = Screen.colors.Blue};
+ }}
+ end)
+end)