From 3e31022b943f33f0466f9f5b7b452cf2363bfb40 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 23 Apr 2014 20:57:27 +0200 Subject: core.actions: Enhanced :tab_new so you can type 5 --- ranger/core/actions.py | 7 ++++--- 1 file 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" -- cgit 1.4.1-2-gfad0