We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 82630e2 + 35c95a6 commit 9c3f977Copy full SHA for 9c3f977
lua/auto-session/lib.lua
@@ -520,7 +520,7 @@ function Lib.find_matching_directory(dirToFind, dirs)
520
---@diagnostic disable-next-line: param-type-mismatch
521
for path in string.gmatch(dir, "[^\r\n]+") do
522
local simplified_path = vim.fn.simplify(path)
523
- local path_without_trailing_slashes = string.gsub(simplified_path, "/+$", "")
+ local path_without_trailing_slashes = string.gsub(simplified_path, "([/~].*)/+$", "%1")
524
525
-- Lib.logger.debug("find_matching_directory simplified: " .. simplified_path)
526
0 commit comments