fix(statusline): no cmdline ruler for autocommand window

Problem:  Cmdline ruler may be drawn for autocommand window.
Solution: Check that the current window is not an autocommand window
          when deciding whether to draw the ruler.
(cherry picked from commit b58ce1ab79)
This commit is contained in:
Luuk van Baal
2026-05-22 15:08:33 +02:00
committed by github-actions[bot]
parent d9b8bac435
commit ae9f7accdd
2 changed files with 15 additions and 1 deletions

View File

@@ -955,6 +955,18 @@ describe('statusline', function()
end)
eq('B:' .. truncated, rendered)
end)
it('no cmdline ruler for autocmd window #39938', function()
command('set ruler laststatus=2')
api.nvim_create_autocmd('BufDelete', { command = 'redrawstatus' })
api.nvim_exec_autocmds('BufDelete', { buf = api.nvim_create_buf(true, true) })
screen:expect([[
^ |
{1:~ }|*5
{3:[No Name] 0,0-1 All}|
|
]])
end)
end)
describe('default statusline', function()