Skip to content

Commit aac28a7

Browse files
committed
fix: self.path is nil on startup ...
1 parent 109f570 commit aac28a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/float-preview.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function FloatPreview:attach(bufnr)
331331
for _, key in ipairs(self.cfg.mapping.preview) do
332332
vim.keymap.set("n", key, function()
333333
local _, node = pcall(get_node)
334-
if self.path == node.path then
334+
if self.path ~= nil and self.path == node.path then
335335
self.close_preview(self)
336336
return
337337
end

0 commit comments

Comments
 (0)