@@ -54,18 +54,14 @@ function! VimuxRunCommand(command, ...)
54
54
if ! exists (' g:VimuxRunnerIndex' ) || s: hasRunner (g: VimuxRunnerIndex ) == # -1
55
55
call VimuxOpenRunner ()
56
56
endif
57
-
58
57
let l: autoreturn = 1
59
58
if exists (' a:1' )
60
59
let l: autoreturn = a: 1
61
60
endif
62
-
63
61
let resetSequence = VimuxOption (' g:VimuxResetSequence' , ' q C-u' )
64
62
let g: VimuxLastCommand = a: command
65
-
66
63
call VimuxSendKeys (resetSequence)
67
64
call VimuxSendText (a: command )
68
-
69
65
if l: autoreturn == # 1
70
66
call VimuxSendKeys (' Enter' )
71
67
endif
@@ -85,7 +81,6 @@ endfunction
85
81
86
82
function ! VimuxOpenRunner ()
87
83
let nearestIndex = s: nearestIndex ()
88
-
89
84
if VimuxOption (' g:VimuxUseNearest' , 1 ) == # 1 && nearestIndex != -1
90
85
let g: VimuxRunnerIndex = nearestIndex
91
86
else
@@ -97,7 +92,6 @@ function! VimuxOpenRunner()
97
92
elseif s: runnerType () == # ' window'
98
93
call s: tmux (' new-window ' .extraArguments)
99
94
endif
100
-
101
95
let g: VimuxRunnerIndex = s: tmuxIndex ()
102
96
call s: setRunnerName ()
103
97
call s: tmux (' last-' .s: runnerType ())
@@ -203,13 +197,11 @@ function! s:nearestIndex()
203
197
let t = s: runnerType ()
204
198
let filter = s: getTargetFilter ()
205
199
let views = split (s: tmux (' list-' .t ." s -F '#{" .t .' _active}:#{' .t ." _id}'" .filter ), ' \n' )
206
-
207
200
for view in views
208
201
if match (view , ' 1:' ) == # -1
209
202
return split (view , ' :' )[1 ]
210
203
endif
211
204
endfor
212
-
213
205
return -1
214
206
endfunction
215
207
@@ -229,7 +221,7 @@ endfunction
229
221
function ! s: setRunnerName ()
230
222
let targetName = VimuxOption (' g:VimuxRunnerName' , ' ' )
231
223
if targetName == # ' '
232
- return
224
+ return
233
225
endif
234
226
let t = s: runnerType ()
235
227
if t == # ' window'
@@ -239,7 +231,6 @@ function! s:setRunnerName()
239
231
endif
240
232
endfunction
241
233
242
-
243
234
function ! s: runnerType ()
244
235
return VimuxOption (' g:VimuxRunnerType' , ' pane' )
245
236
endfunction
0 commit comments