Skip to content

Commit 4cea1a1

Browse files
committed
Merge pull request #97 from ton/fix-closing-incorrect-pane
Identify a pane by its window and its pane index
2 parents cae2150 + 8ff2288 commit 4cea1a1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/vimux.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function! VimuxPromptCommand()
123123
endfunction
124124

125125
function! _VimuxTmuxSession()
126-
return _VimuxTmuxProperty("S")
126+
return _VimuxTmuxProperty("#S")
127127
endfunction
128128

129129
function! _VimuxTmuxIndex()
@@ -135,11 +135,11 @@ function! _VimuxTmuxIndex()
135135
endfunction
136136

137137
function! _VimuxTmuxPaneIndex()
138-
return _VimuxTmuxProperty("P")
138+
return _VimuxTmuxProperty("#I.#P")
139139
endfunction
140140

141141
function! _VimuxTmuxWindowIndex()
142-
return _VimuxTmuxProperty("I")
142+
return _VimuxTmuxProperty("#I")
143143
endfunction
144144

145145
function! _VimuxNearestIndex()
@@ -167,9 +167,9 @@ function! _VimuxOption(option, default)
167167
endfunction
168168

169169
function! _VimuxTmuxProperty(property)
170-
return substitute(system("tmux display -p '#".a:property."'"), '\n$', '', '')
170+
return substitute(system("tmux display -p '".a:property."'"), '\n$', '', '')
171171
endfunction
172172

173173
function! _VimuxHasRunner(index)
174-
return match(system("tmux list-"._VimuxRunnerType()."s"), a:index.":")
174+
return match(system("tmux list-"._VimuxRunnerType()."s -a"), a:index.":")
175175
endfunction

0 commit comments

Comments
 (0)