Fixes issues with switching to snacks explorer
This commit is contained in:
parent
1699bd2574
commit
8892845c03
6 changed files with 12 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue