fix(nvim): set winhighlight via nvim_set_option_value, not open_win

winhighlight is a window option, not an nvim_open_win config key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-05-26 12:09:15 +02:00
parent 766cfc0f8f
commit b1bdb3c540
1 changed files with 11 additions and 11 deletions

View File

@ -178,18 +178,18 @@ end
local function _pim_float(row, col, height, width, border)
local buf = vim.api.nvim_create_buf(false, true)
vim.api.nvim_open_win(buf, true, {
relative = "editor",
row = row,
col = col,
height = math.max(1, height),
width = math.max(1, width),
style = "minimal",
border = border or "none",
zindex = 50,
winhighlight = "Normal:Normal,NormalNC:Normal",
local win = vim.api.nvim_open_win(buf, true, {
relative = "editor",
row = row,
col = col,
height = math.max(1, height),
width = math.max(1, width),
style = "minimal",
border = border or "none",
zindex = 50,
})
return vim.api.nvim_get_current_win()
vim.api.nvim_set_option_value("winhighlight", "Normal:Normal,NormalNC:Normal", { win = win })
return win
end
-- n/g/f: individual centered floating windows