@@ -63,31 +63,31 @@ function! VimuxOpenRunner()
63
63
else
64
64
call system (" tmux split-window -p " .height." -" .orientation)
65
65
let g: VimuxRunnerIndex = _VimuxTmuxIndex ()
66
- call system (" tmux last-pane " )
66
+ call system (" tmux last-" . _VimuxRunnerType () )
67
67
endif
68
68
endfunction
69
69
70
70
function ! VimuxCloseRunner ()
71
71
if exists (" g:VimuxRunnerIndex" )
72
- call system (" tmux kill-pane -t " .g: VimuxRunnerIndex )
72
+ call system (" tmux kill-" . _VimuxRunnerType (). " -t " .g: VimuxRunnerIndex )
73
73
unlet g: VimuxRunnerIndex
74
74
endif
75
75
endfunction
76
76
77
77
function ! VimuxInspectRunner ()
78
- call system (" tmux select-pane -t " .g: VimuxRunnerIndex )
78
+ call system (" tmux select-" . _VimuxRunnerType (). " -t " .g: VimuxRunnerIndex )
79
79
call system (" tmux copy-mode" )
80
80
endfunction
81
81
82
82
function ! VimuxScrollUpInspect ()
83
83
call VimuxInspectRunner ()
84
- call system (" tmux last-pane " )
84
+ call system (" tmux last-" . _VimuxRunnerType () )
85
85
call VimuxSendKeys (" C-u" )
86
86
endfunction
87
87
88
88
function ! VimuxScrollDownInspect ()
89
89
call VimuxInspectRunner ()
90
- call system (" tmux last-pane " )
90
+ call system (" tmux last-" . _VimuxRunnerType () )
91
91
call VimuxSendKeys (" C-d" )
92
92
endfunction
93
93
@@ -119,7 +119,7 @@ function! _VimuxTmuxWindowIndex()
119
119
endfunction
120
120
121
121
function ! _VimuxNearestIndex ()
122
- let panes = split (system (" tmux list-panes " ), " \n " )
122
+ let panes = split (system (" tmux list-" . _VimuxRunnerType (). " s " ), " \n " )
123
123
124
124
for pane in panes
125
125
if match (pane, " (active)" ) == -1
@@ -130,6 +130,10 @@ function! _VimuxNearestIndex()
130
130
return -1
131
131
endfunction
132
132
133
+ function ! _VimuxRunnerType ()
134
+ return _VimuxOption (" g:VimuxRunnerType" , " pane" )
135
+ endfunction
136
+
133
137
function ! _VimuxOption (option , default)
134
138
if exists (a: option )
135
139
return eval (a: option )
@@ -143,5 +147,5 @@ function! _VimuxTmuxProperty(property)
143
147
endfunction
144
148
145
149
function ! _VimuxHasRunner (index )
146
- return match (system (" tmux list-panes " ), a: index ." :" )
150
+ return match (system (" tmux list-" . _VimuxRunnerType (). " s " ), a: index ." :" )
147
151
endfunction
0 commit comments