Skip to content

Commit

Permalink
fix: delete scroll map close #1447
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 24, 2024
1 parent e050ff4 commit 655505d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/lspsaga/hover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ function hover:open_floating_preview(content, option_fn)
)

util.scroll_in_float(curbuf, self.winid)
api.nvim_create_autocmd('WinClosed', {
buffer = self.bufnr,
callback = function()
util.delete_scroll_map(curbuf)
end,
})

util.map_keys(self.bufnr, 'q', function()
if self.winid and api.nvim_win_is_valid(self.winid) then
Expand Down

0 comments on commit 655505d

Please sign in to comment.