aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/winbar_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-05-20 00:15:47 +0200
committerbfredl <bjorn.linse@gmail.com>2022-05-22 18:56:07 +0200
commit060ef52d8bd3466d212e859a3fd00ed2d1dab263 (patch)
treead7c1710b635644f9b6f03c34ea20dda22c584f3 /test/functional/ui/winbar_spec.lua
parent3fe6bf3a1e50299dbdd6314afbb18e468eb7ce08 (diff)
downloadrneovim-060ef52d8bd3466d212e859a3fd00ed2d1dab263.tar.gz
rneovim-060ef52d8bd3466d212e859a3fd00ed2d1dab263.tar.bz2
rneovim-060ef52d8bd3466d212e859a3fd00ed2d1dab263.zip
fix(winbar): allow winbar to display the ruler
Diffstat (limited to 'test/functional/ui/winbar_spec.lua')
-rw-r--r--test/functional/ui/winbar_spec.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua
index af7736293c..83bc61bc4e 100644
--- a/test/functional/ui/winbar_spec.lua
+++ b/test/functional/ui/winbar_spec.lua
@@ -6,6 +6,7 @@ local insert = helpers.insert
local meths = helpers.meths
local eq = helpers.eq
local poke_eventloop = helpers.poke_eventloop
+local feed = helpers.feed
describe('winbar', function()
local screen
@@ -148,6 +149,59 @@ describe('winbar', function()
|
]])
end)
+ it('can be ruler', function()
+ insert [[
+ just some
+ random text]]
+ meths.set_option('winbar', 'Hello, I am a ruler: %l,%c')
+ screen:expect{grid=[[
+ {1:Hello, I am a ruler: 2,11 }|
+ just some |
+ random tex^t |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+ feed 'b'
+ screen:expect{grid=[[
+ {1:Hello, I am a ruler: 2,8 }|
+ just some |
+ random ^text |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+ feed 'k'
+ screen:expect{grid=[[
+ {1:Hello, I am a ruler: 1,8 }|
+ just so^me |
+ random text |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+ end)
it('works with laststatus=3', function()
command('set laststatus=3')
screen:expect([[