Skip to content

Commit 7f97466

Browse files
committed
fix(test_options): adapt global-local option to new Nvim default
The test previously depended on the 'statusline' option being empty by default. The default 'statusline' value changed in Nvim commit 28e31f5d3d16fac349d5e2b55837afddb822b0f3 (2025-04-22): feat(options): default statusline expression #33036 Adjust the test to first read the default (global) value of 'statusline', then change the local value of the option, then re-read the global value and verify it hasn't changed.
1 parent 466ffc8 commit 7f97466

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_window.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ def test_vars(vim: Nvim) -> None:
6161
def test_options(vim: Nvim) -> None:
6262
vim.current.window.options['colorcolumn'] = '4,3'
6363
assert vim.current.window.options['colorcolumn'] == '4,3'
64+
old_global_statusline = vim.options['statusline']
6465
# global-local option
6566
vim.current.window.options['statusline'] = 'window-status'
6667
assert vim.current.window.options['statusline'] == 'window-status'
67-
assert vim.options['statusline'] == ''
68+
assert vim.options['statusline'] == old_global_statusline
6869

6970
with pytest.raises(KeyError) as excinfo:
7071
vim.current.window.options['doesnotexist']

0 commit comments

Comments
 (0)