Fix out of range error

Fix the following error. This fixes #72.

E684: list index out of range: 1
E116: Invalid arguments for function match(panes[i], "(active)") == -1
E15: Invalid expression: match(panes[i], "(active)") == -1
fix-tmux-next-3dot4
David Davis 11 years ago
parent 70433ed91b
commit 1a0a8abe71

@ -121,9 +121,9 @@ endfunction
function! _VimuxNearestPaneIndex()
let panes = split(system("tmux list-panes"), "\n")
for i in panes
if match(panes[i], "(active)") == -1
return split(panes[i], ":")[0]
for pane in panes
if match(pane, "(active)") == -1
return split(pane, ":")[0]
endif
endfor

Loading…
Cancel
Save