diff options
-rw-r--r-- | ranger/core/actions.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 6d4c0474..ec853f1b 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -997,11 +997,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): if newtab != self.current_tab: self.tab_open(newtab) - def tab_new(self, path=None): + def tab_new(self, path=None, narg=None): + if narg: + return self.tab_open(narg, path) for i in range(1, 10): if not i in self.tabs: - self.tab_open(i, path) - break + return self.tab_open(i, path) def _get_tab_list(self): assert len(self.tabs) > 0, "There must be >=1 tabs at all times" |