diff options
author | toonn <toonn@toonn.io> | 2018-04-19 12:51:58 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-04-19 13:59:55 +0200 |
commit | ec825cb15005673b9f9092547dbc42bc35ae60bf (patch) | |
tree | 647e8c0273d28ee578784f2faf3141782e6bf75c | |
parent | ae7668078374a6ef30d3a45b29746d7315223761 (diff) | |
download | ranger-ec825cb15005673b9f9092547dbc42bc35ae60bf.tar.gz |
Lift the limit on tabs for :tab_new
-rw-r--r-- | ranger/core/actions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 6bbb35aa..a3aad746 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -1186,10 +1186,10 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m def tab_new(self, path=None, narg=None): if narg: return self.tab_open(narg, path) - for i in range(1, 10): - if i not in self.tabs: - return self.tab_open(i, path) - return None + i = 1 + while i in self.tabs: + i += 1 + return self.tab_open(i, path) def tab_switch(self, path, create_directory=False): """Switches to tab of given path, opening a new tab as necessary. |