about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-02 20:31:04 +0100
committernfnty <git@nfnty.se>2017-02-02 20:31:04 +0100
commit043b7635ed9ef60e6e08453d692685e943fb2a78 (patch)
tree7641c50a1e4853ed7fbd3581cc5703a6d93bd1f7
parent1ea519c6ba034b3bac68565d7e5643b64e9862d5 (diff)
downloadranger-043b7635ed9ef60e6e08453d692685e943fb2a78.tar.gz
api.commands.Command.rest: Fix char space matching
Fixes #772
-rw-r--r--ranger/api/commands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index aa2da3db..d6c02aaa 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -129,8 +129,8 @@ class Command(FileManagerAware):
         """Returns everything from and after arg(n)"""
         got_space = True
         word_count = 0
-        for i in range(len(self.line)):
-            if self.line[i] == " ":
+        for i, char in enumerate(self.line):
+            if char.isspace():
                 if not got_space:
                     got_space = True
                     word_count += 1