summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2018-04-19 12:51:58 +0200
committertoonn <toonn@toonn.io>2018-04-19 13:59:55 +0200
commitec825cb15005673b9f9092547dbc42bc35ae60bf (patch)
tree647e8c0273d28ee578784f2faf3141782e6bf75c
parentae7668078374a6ef30d3a45b29746d7315223761 (diff)
downloadranger-ec825cb15005673b9f9092547dbc42bc35ae60bf.tar.gz
Lift the limit on tabs for :tab_new
-rw-r--r--ranger/core/actions.py8
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.
f='#n1'>1
2
3
4
5
6
7
8
9
10
11
12
13