File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,11 @@ endfunction
66
66
67
67
function ! VimuxOpenRunner ()
68
68
let nearestIndex = _VimuxNearestIndex ()
69
+ let lastIndex = _VimuxLastIndex ()
69
70
70
- if _VimuxOption (" g:VimuxUseNearest" , 1 ) == 1 && nearestIndex != -1
71
+ if _VimuxOption (" g:VimuxUseLast" , 1 ) == 1 && lastIndex != -1
72
+ let g: VimuxRunnerIndex = lastIndex
73
+ elseif _VimuxOption (" g:VimuxUseNearest" , 1 ) == 1 && nearestIndex != -1
71
74
let g: VimuxRunnerIndex = nearestIndex
72
75
else
73
76
if _VimuxRunnerType () == " pane"
@@ -182,6 +185,22 @@ function! _VimuxNearestIndex()
182
185
return -1
183
186
endfunction
184
187
188
+ function ! _VimuxLastIndex ()
189
+
190
+ let currentID = call _VimuxTmuxPaneIndex ()
191
+
192
+ call _VimuxTmux (" last-pane" )
193
+ let lastID = call _VimuxTmuxPaneIndex ()
194
+ call _VimuxTmux (" last-pane" )
195
+
196
+ if currentID != lastID
197
+ return lastID
198
+ else
199
+ return -1
200
+ endif
201
+
202
+ endfunction
203
+
185
204
function ! _VimuxRunnerType ()
186
205
return _VimuxOption (" g:VimuxRunnerType" , " pane" )
187
206
endfunction
You can’t perform that action at this time.
0 commit comments