Skip to content

Commit 68cf987

Browse files
authored
fix: change EndOfBuffer highlight for popups (#288)
1 parent e6267f7 commit 68cf987

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lua/plenary/popup/init.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,11 @@ function popup.create(what, vim_options)
386386
end
387387

388388
if vim_options.highlight then
389-
vim.api.nvim_win_set_option(win_id, "winhl", string.format("Normal:%s", vim_options.highlight))
389+
vim.api.nvim_win_set_option(
390+
win_id,
391+
"winhl",
392+
string.format("Normal:%s,EndOfBuffer:%s", vim_options.highlight, vim_options.highlight)
393+
)
390394
end
391395

392396
-- enter

tests/plenary/popup_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("plenary.popup", function()
2727
highlight = "PopupColor1",
2828
})
2929

30-
eq("Normal:PopupColor1", vim.api.nvim_win_get_option(win_id, "winhl"))
30+
eq("Normal:PopupColor1,EndOfBuffer:PopupColor1", vim.api.nvim_win_get_option(win_id, "winhl"))
3131
end)
3232

3333
it("can create a border", function()

0 commit comments

Comments
 (0)