Skip to content

Commit 9ec2d61

Browse files
committed
If runner is 'pane', don't span windows
1 parent f8f33ed commit 9ec2d61

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugin/vimux.vim

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,17 @@ function! _VimuxLastIndex()
194194
call _VimuxTmux("last-pane")
195195

196196
if currentID != lastID
197-
return lastID
198-
else
199-
return -1
197+
if _VimuxRunnerType() == "window"
198+
return lastID
199+
elseif _VimuxRunnerType() == "pane"
200+
if split(currentID, "\\.")[0] == split(lastID, "\\.")[0]
201+
return lastID
202+
endif
203+
endif
200204
endif
201205

206+
return -1
207+
202208
endfunction
203209

204210
function! _VimuxRunnerType()

0 commit comments

Comments
 (0)