fix(options): repair stale UI state after :set all& #39026

Problem: `set all&` resets option values directly and leaves UI-derived state stale for `guicursor`, `laststatus`, and `showtabline`.

Solution: Repair some of the stale UI state in the bulk reset path by reparsing `guicursor`, refreshing statusline state, and recomputing tabline/window rows.
This commit is contained in:
Barrett Ruth
2026-04-23 18:37:59 -04:00
committed by GitHub
parent 645a588aa6
commit c39be17131
3 changed files with 64 additions and 0 deletions

View File

@@ -378,6 +378,22 @@ describe('ui/cursor', function()
end)
end)
it("'set all&' reapplies 'guicursor'", function()
command('set guicursor=n:ver25')
screen:expect(function()
eq('vertical', screen._mode_info[1].cursor_shape)
eq(25, screen._mode_info[1].cell_percentage)
end)
command('set all&')
screen:expect(function()
eq('block', screen._mode_info[1].cursor_shape)
eq(0, screen._mode_info[1].blinkon)
eq(0, screen._mode_info[1].blinkoff)
eq(true, screen._cursor_style_enabled)
end)
end)
it(':sleep does not hide cursor when sleeping', function()
n.feed(':sleep 300m | echo 42')
screen:expect([[