This commit is contained in:
Přemysl Eric Janouch 2020-09-29 02:31:49 +02:00
parent 9a12fd8021
commit 1507f2dff9
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -1100,10 +1100,9 @@ fun change_dir (const string &path) {
return; return;
} }
auto old_cwd = g.cwd; level last {g.offset, g.cursor, g.cwd, g.entries[g.cursor].filename};
level last {g.offset, g.cursor, old_cwd, g.entries[g.cursor].filename};
g.cwd = full_path; g.cwd = full_path;
bool same_path = old_cwd == g.cwd; bool same_path = last.path == g.cwd;
reload (same_path); reload (same_path);
if (is_ancestor_dir (last.path, g.cwd)) { if (is_ancestor_dir (last.path, g.cwd)) {