Skip to content

Commit ce3f67d

Browse files
committed
test(ALL): on Nightly nvim_win_get_config() always returns "style"
See PR 38122 in neovim/neovim Details: - This also affects the documentation as one test is about the officially documented example in MiniFiles-examples
1 parent cad365c commit ce3f67d

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

doc/mini-files.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ Callback for each file action event will receive `data` field
367367
- <to> - full path of entry after action (`nil` for permanent "delete" action).
368368

369369
------------------------------------------------------------------------------
370-
*MiniFiles-examples*
371370
# Toggle explorer ~
372371

373372
Use a combination of |MiniFiles.open()| and |MiniFiles.close()|: >lua
@@ -405,6 +404,11 @@ updated internally. Use `MiniFilesWindowUpdate` event for them: >lua
405404
-- Ensure fixed height
406405
config.height = 10
407406

407+
------------------------------------------------------------------------------
408+
*MiniFiles-examples*
409+
-- Ensure style
410+
config.style = nil
411+
408412
-- Ensure no title padding
409413
local n = #config.title
410414
config.title[1][1] = config.title[1][1]:gsub('^ ', '')

lua/mini/files.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@
398398
---
399399
--- -- Ensure fixed height
400400
--- config.height = 10
401+
402+
--- -- Ensure style
403+
--- config.style = nil
401404
---
402405
--- -- Ensure no title padding
403406
--- local n = #config.title

tests/test_files.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5523,6 +5523,8 @@ T['Events']['`MiniFilesWindowUpdate` can customize internally set window config
55235523
local config = vim.api.nvim_win_get_config(args.data.win_id)
55245524
-- Ensure fixed height
55255525
config.height = 5
5526+
-- Ensure style
5527+
config.style = nil
55265528
-- Ensure title padding
55275529
local n = #config.title
55285530
config.title[1][1] = config.title[1][1]:gsub('^ ', '')

tests/test_map.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,13 @@ T['open()']['correctly computes window config'] = function()
385385
map_open()
386386
local win_id = get_map_win_id()
387387

388-
local hide, mouse, border
388+
local hide, mouse, border, style
389389
if child.fn.has('nvim-0.10') == 1 then hide = false end
390390
if child.fn.has('nvim-0.11') == 1 then mouse = false end
391-
if child.fn.has('nvim-0.12') == 1 then border = 'none' end
391+
if child.fn.has('nvim-0.12') == 1 then
392+
border = 'none'
393+
style = 'minimal'
394+
end
392395
eq(child.api.nvim_win_get_config(win_id), {
393396
anchor = 'NE',
394397
border = border,
@@ -400,6 +403,7 @@ T['open()']['correctly computes window config'] = function()
400403
mouse = mouse,
401404
relative = 'editor',
402405
row = 0,
406+
style = style,
403407
width = 10,
404408
zindex = 10,
405409
})

0 commit comments

Comments
 (0)