Skip to content

Commit

Permalink
fix(ui): safer adding of winhl
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 10, 2023
1 parent acf47e2 commit 36b1935
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/noice/view/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ function NuiView:fix_border()
then
local winhl = vim.api.nvim_win_get_option(self._nui.border.winid, "winhighlight") or ""
if not winhl:find("IncSearch") then
winhl = winhl .. ",Search:,Incsearch:"
local hl = vim.split(winhl, ",")
hl[#hl + 1] = "Search:"
hl[#hl + 1] = "IncSearch:"
winhl = table.concat(hl, ",")
vim.api.nvim_win_set_option(self._nui.border.winid, "winhighlight", winhl)
end
end
Expand Down

0 comments on commit 36b1935

Please sign in to comment.