Skip to content

Instantly share code, notes, and snippets.

@farzadmf
Created April 20, 2023 17:26
Show Gist options
  • Save farzadmf/3f922d8ec7aaafe09854763b060b7649 to your computer and use it in GitHub Desktop.
Save farzadmf/3f922d8ec7aaafe09854763b060b7649 to your computer and use it in GitHub Desktop.
diff --git a/lua/lspsaga/definition.lua b/lua/lspsaga/definition.lua
index aab19e4..913027b 100644
--- a/lua/lspsaga/definition.lua
+++ b/lua/lspsaga/definition.lua
@@ -274,6 +274,7 @@ function def:peek_definition(method)
api.nvim_create_autocmd('WinClosed', {
once = true,
+ buffer = node.bufnr,
callback = function(opt)
local curwin = api.nvim_get_current_win()
if curwin == self.winid then
@AngelontheRoad
Copy link

Thanks this patch works for me :)

@farzadmf
Copy link
Author

great! Works for me too; for some reason, it was ignored in my comment in the repo itself 🙁

@briskajanis1
Copy link

thanks. Worked for me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment