mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(winbar): allow winbar to display the ruler
This commit is contained in:
parent
3fe6bf3a1e
commit
060ef52d8b
2
.mailmap
2
.mailmap
@ -8,7 +8,7 @@ Anmol Sethi <hi@nhooyr.io> <nhooyr@users.noreply.github.com>
|
|||||||
BK1603 <chouhan.shreyansh2702@gmail.com> Shreyansh Chouhan
|
BK1603 <chouhan.shreyansh2702@gmail.com> Shreyansh Chouhan
|
||||||
Billy Su <g4691821@gmail.com> Billy SU
|
Billy Su <g4691821@gmail.com> Billy SU
|
||||||
Billy Vong <billyvg@gmail.com> <billyvg@users.noreply.github.com>
|
Billy Vong <billyvg@gmail.com> <billyvg@users.noreply.github.com>
|
||||||
Björn Linse <bjorn.linse@gmail.com> bfredl
|
bfredl <bjorn.linse@gmail.com>
|
||||||
Carlos Hernandez <carlos@techbyte.ca> <hurricanehrndz@users.noreply.github.com>
|
Carlos Hernandez <carlos@techbyte.ca> <hurricanehrndz@users.noreply.github.com>
|
||||||
Chris Kipp <ckipp@pm.me> ckipp01
|
Chris Kipp <ckipp@pm.me> ckipp01
|
||||||
Christian Clason <c.clason@uni-graz.at> <christian.clason@uni-due.de>
|
Christian Clason <c.clason@uni-graz.at> <christian.clason@uni-due.de>
|
||||||
|
@ -6463,6 +6463,9 @@ void showruler(bool always)
|
|||||||
} else {
|
} else {
|
||||||
win_redr_ruler(curwin, always);
|
win_redr_ruler(curwin, always);
|
||||||
}
|
}
|
||||||
|
if (*p_wbr != NUL || *curwin->w_p_wbr != NUL) {
|
||||||
|
win_redr_winbar(curwin);
|
||||||
|
}
|
||||||
|
|
||||||
if (need_maketitle
|
if (need_maketitle
|
||||||
|| (p_icon && (stl_syntax & STL_IN_ICON))
|
|| (p_icon && (stl_syntax & STL_IN_ICON))
|
||||||
|
@ -6,6 +6,7 @@ local insert = helpers.insert
|
|||||||
local meths = helpers.meths
|
local meths = helpers.meths
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local poke_eventloop = helpers.poke_eventloop
|
local poke_eventloop = helpers.poke_eventloop
|
||||||
|
local feed = helpers.feed
|
||||||
|
|
||||||
describe('winbar', function()
|
describe('winbar', function()
|
||||||
local screen
|
local screen
|
||||||
@ -148,6 +149,59 @@ describe('winbar', function()
|
|||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
end)
|
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()
|
it('works with laststatus=3', function()
|
||||||
command('set laststatus=3')
|
command('set laststatus=3')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Loading…
Reference in New Issue
Block a user