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
8d43f74 ^
79fb765 ^
8d43f74 ^


























79fb765 ^











8d43f74 ^




















54db84a ^
8d43f74 ^




54db84a ^
8d43f74 ^





54db84a ^
8d43f74 ^








































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139