Skip to content

Commit 29788c2

Browse files
committed
Replace tmux send-keys/select-pane commands with split-window args
1 parent 2f0f16c commit 29788c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ftplugin/supercollider.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,9 @@ function SClangStart(...)
259259
wincmd w
260260
elseif l:tmux || l:screen
261261
if l:tmux
262-
let l:cmd = "tmux split-window -" . l:splitDir . " -p " . l:splitSize . " ;"
263-
let l:cmd .= "tmux send-keys " . s:sclangPipeApp . " Enter ; tmux select-pane -l"
262+
" To disable focusing on the newly created pane, -d flag is used
263+
let l:cmdfmt = "tmux split-window -d -%s -p %d %s"
264+
let l:cmd = printf(l:cmdfmt, l:splitDir, l:splitSize, l:sclangPipeApp)
264265
call system(l:cmd)
265266
elseif l:screen
266267
" Main window will have focus when splitting, so recalculate splitSize percentage

0 commit comments

Comments
 (0)