Fixes issues with switching to snacks explorer

This commit is contained in:
Michel Fedde 2025-02-16 22:07:56 +01:00
parent 1699bd2574
commit 8892845c03
6 changed files with 12 additions and 17 deletions

View file

@ -6,14 +6,7 @@ end
function fs.getCurrentPath()
local currentBuffer = vim.fn.expand("%")
if not startswith(currentBuffer, "neo-tree") then
return currentBuffer
end
local filesystemState = require("neo-tree.sources.manager").get_state("filesystem")
local currentLine = vim.fn.getpos(".")[2]
return filesystemState.tree:get_node(currentLine).path
print(currentBuffer)
end
return fs