Skip to content

Commit ade0a55

Browse files
committed
fix wrong title when go up
1 parent 24d329d commit ade0a55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/dired/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,9 @@ Browser.refresh = function(state, path)
682682
if not cfg.title then
683683
cfg.title = curpath
684684
elseif cfg.title[1][1] ~= curpath then
685-
cfg.title = vim.fs.joinpath(cfg.title[1][1], curpath)
685+
local curtitle = cfg.title[1][1]
686+
cfg.title = vim.startswith(curtitle, curpath) and curpath
687+
or vim.fs.joinpath(cfg.title[1][1], curpath)
686688
end
687689
api.nvim_win_set_config(state.win, cfg)
688690

0 commit comments

Comments
 (0)