Skip to content

Commit 8305950

Browse files
committed
fix: double check path
1 parent 10c6062 commit 8305950

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lua/float-preview.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,6 @@ function FloatPreview:close_preview()
302302
return
303303
end
304304

305-
if node.absolute_path == self.path then
306-
return
307-
end
308305
self:_close "cursor moved"
309306
end
310307

@@ -332,8 +329,7 @@ function FloatPreview:attach(bufnr)
332329
vim.keymap.set("n", key, function()
333330
local _, node = pcall(get_node)
334331
if self.path ~= nil and self.path == node.path then
335-
-- self.close_preview(self)
336-
self:_close "toggle preview"
332+
self.close_preview(self)
337333
return
338334
end
339335

0 commit comments

Comments
 (0)