diff options
-rw-r--r-- | ranger/core/actions.py | 6 | ||||
-rw-r--r-- | ranger/core/tab.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 95a536ef..2f76527a 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -840,7 +840,6 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): previous_tab = self.thistab try: tab = self.tabs[name] - tab.enter_dir(tab.path, history=False) except KeyError: # create a new tab if path: @@ -848,10 +847,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): else: tab = Tab(self.thistab.path) self.tabs[name] = tab + self.thistab = tab tab.enter_dir(tab.path, history=True) if previous_tab: tab.inherit_history(previous_tab.history) - self.thistab = tab + else: + self.thistab = tab + tab.enter_dir(tab.path, history=False) if tab_has_changed: self.change_mode('normal') diff --git a/ranger/core/tab.py b/ranger/core/tab.py index 2fd71cb6..6059eb6b 100644 --- a/ranger/core/tab.py +++ b/ranger/core/tab.py @@ -146,7 +146,7 @@ class Tab(FileManagerAware, SettingsAware): self.thisdir.sort_directories_first = self.fm.settings.sort_directories_first self.thisdir.sort_reverse = self.fm.settings.sort_reverse self.thisdir.sort_if_outdated() - self.thisfile = self.thisdir.pointed_obj + self._thisfile = self.thisdir.pointed_obj if history: self.history.add(new_thisdir) |