Assign unnesting level to the last history level
Surprise unnesting ~ is no fun.
This commit is contained in:
@@ -2297,9 +2297,6 @@ fun load_config () {
|
||||
else if (tokens.front () == "history")
|
||||
load_history_level (tokens);
|
||||
}
|
||||
|
||||
// FIXME: we don't reset unnest_depth when the last history level
|
||||
// doesn't match the start directory.
|
||||
}
|
||||
|
||||
fun save_config () {
|
||||
@@ -2387,6 +2384,9 @@ int main (int argc, char *argv[]) {
|
||||
load_colors ();
|
||||
load_cmdline (argc, argv);
|
||||
g.start_dir = g.cwd = initial_cwd ();
|
||||
// XXX: We might want to store this within history levels.
|
||||
if (g.levels.empty () || g.levels.back ().path != g.cwd)
|
||||
g.unnest_depth = 0;
|
||||
reload (false);
|
||||
pop_levels (g.cwd);
|
||||
update ();
|
||||
|
||||
Reference in New Issue
Block a user