@@ -69,52 +69,52 @@ function! s:to_cursor.failure_message_for_should(actual, expected)
69
69
Expect a: actual [1 ] > 0
70
70
Expect a: expected [1 ] > 0
71
71
72
- let l: line1 = getline (a: actual [0 ])
73
- let l: line2 = getline (a: expected [0 ])
72
+ let line1 = getline (a: actual [0 ])
73
+ let line2 = getline (a: expected [0 ])
74
74
" Change char on cursor to '█'.
75
- let l: line1 = strpart (l: line1 , 0 , a: actual [1 ]-1 )
75
+ let line1 = strpart (l: line1 , 0 , a: actual [1 ]-1 )
76
76
\ . ' █'
77
77
\ . strpart (l: line1 , a: actual [1 ])
78
78
let line2 = strpart (l: line2 , 0 , a: expected [1 ]-1 )
79
79
\ . ' █'
80
80
\ . strpart (l: line2 , a: expected [1 ])
81
81
" Separation of both cases with \n would be nice, but
82
82
" vim-vspec allow oneliners as return string, only.
83
- let l: msg = ' Line ' . string (a: actual [0 ]) . " : '" . l: line1
83
+ let msg = ' Line ' . string (a: actual [0 ]) . " : '" . l: line1
84
84
\ . " ',\x09\x09 Line " . string (a: expected [0 ]) . " : '" . l: line2 . " '\x0a "
85
85
return l: msg
86
86
endfunction
87
87
88
88
function ! CompareMovements (movement1, movement2, backward)
89
- let l: jumpmarks = [
89
+ let jumpmarks = [
90
90
\ [a: movement1 , []],
91
91
\ [a: movement2 , []],
92
92
\ ]
93
93
94
94
" Loop through current buffer in both variants {{
95
95
for [l: handler , l: list ] in l: jumpmarks
96
96
if a: backward == 1
97
- let l: last_line = line (' $' )
98
- let l: last_char = len (getline (l: last_line ))
97
+ let last_line = line (' $' )
98
+ let last_char = len (getline (l: last_line ))
99
99
call cursor (l: last_line , l: last_char )
100
100
else
101
101
call cursor ([1 ,1 ])
102
102
endif
103
103
104
- let l: lastpos = [0 ,0 ]
104
+ let lastpos = [0 ,0 ]
105
105
106
106
" Centralize line. Otherwise, Easymotion functions aborts
107
107
" at the end of the (virtual) window.
108
108
call TryNormal (' zz' )
109
109
call TryNormal (l: handler )
110
- let l: curpos = getpos (" ." )[1 :2 ]
110
+ let curpos = getpos (" ." )[1 :2 ]
111
111
112
112
while l: lastpos != l: curpos
113
- let l: list += [l: curpos ]
114
- let l: lastpos = l: curpos
113
+ let list += [l: curpos ]
114
+ let lastpos = l: curpos
115
115
call TryNormal (' zz' )
116
116
call TryNormal (l: handler )
117
- let l: curpos = getpos (" ." )[1 :2 ]
117
+ let curpos = getpos (" ." )[1 :2 ]
118
118
" Abort after a fixed number of steps.
119
119
if len (l: list ) > s: maximal_number_of_compared_movments
120
120
break
@@ -131,11 +131,11 @@ function! CompareMovements(movement1, movement2, backward)
131
131
endif
132
132
133
133
" Search for first unmatching position. {{
134
- let l: index = 0
135
- let l: len = min ([len (l: cursor_positions2 ), len (l: cursor_positions1 )])
134
+ let index = 0
135
+ let len = min ([len (l: cursor_positions2 ), len (l: cursor_positions1 )])
136
136
while l: index < l: len
137
137
Expect l: cursor_positions2 [l: index ] to_cursor l: cursor_positions1 [l: index ]
138
- let l: index += 1
138
+ let index += 1
139
139
endwhile
140
140
141
141
" Collision with begin or end of file or while loop aborts to early.
0 commit comments