Skip to content

Commit 8cb8aee

Browse files
saying121mrcjkb
authored andcommitted
feat(range_hover): switch to normal when the floating window is focused
1 parent a706d03 commit 8cb8aee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lua/rustaceanvim/commands/hover_range.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,17 @@ local function handler(_, result, _)
8181
})
8282
)
8383

84+
vim.api.nvim_create_autocmd('WinEnter', {
85+
callback = function()
86+
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 'n', true)
87+
end,
88+
buffer = bufnr,
89+
})
90+
8491
if win_opt.auto_focus then
8592
vim.api.nvim_set_current_win(winnr)
93+
94+
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, false, true), 'n', true)
8695
end
8796

8897
if _state.winnr ~= nil then

0 commit comments

Comments
 (0)