Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/codediff/ui/keymap_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function M.toggle(tabpage)
title_pos = "center",
})
vim.wo[win].cursorline = false
vim.wo[win].winhighlight = "NormalFloat:Normal"
vim.wo[win].winhighlight = "NormalFloat:NormalFloat"

-- Track window in session for toggle
if session then
Expand Down
13 changes: 13 additions & 0 deletions tests/keymap/keymap_help_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,19 @@ describe("keymap help popup", function()
cleanup()
end)

it("uses NormalFloat for the help window body highlight", function()
local tabpage, cleanup = open_standalone()

keymap_help.toggle(tabpage)
local session = lifecycle.get_session(tabpage)
local win = session and session._help_win
assert.is_true(win ~= nil and vim.api.nvim_win_is_valid(win), "help window should open")
assert.are.same("NormalFloat:NormalFloat", vim.wo[win].winhighlight)
keymap_help.toggle(tabpage)

cleanup()
end)

it("does not advertise a key disabled in config", function()
local tabpage, cleanup = open_standalone({ keymaps = { view = { quit = false, toggle_compact = false } } })

Expand Down
Loading