Skip to content

Commit

Permalink
Add path separator to current file tree to prevent wrong partial match
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Tang <[email protected]>
  • Loading branch information
rosstang authored and ldelossa committed May 18, 2023
1 parent a339a0b commit cf1ed20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/ide/components/explorer/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ ExplorerComponent.new = function(name, config)
return false
end

local current = vim.fn.fnamemodify(root.path, ":.")
local current = vim.fn.fnamemodify(root.path, ":.") .. '/'

if vim.fn.strpart(dest, 0, #current) == current then
if not self.tree.root.expanded then
Expand Down

0 comments on commit cf1ed20

Please sign in to comment.