tmux.kak: use TMUX_PANE for tmux-terminal-{horizontal,vertical}

In case a user connects to the same Kakoune session from multiple tmux
windows/sessions, this makes the splits appear next to the calling client,
instead the client where the Kakoune session was started.
This commit is contained in:
Johannes Altmanninger 2020-07-26 21:07:42 +02:00
parent c2516f02f6
commit 0fb99f217a

View File

@ -16,6 +16,9 @@ define-command -hidden -params 2.. tmux-terminal-impl %{
exit exit
fi fi
tmux_args="$1" tmux_args="$1"
if [ "${1%%-*}" = split ]; then
tmux_args="$tmux_args -t ${kak_client_env_TMUX_PANE}"
fi
shift shift
# ideally we should escape single ';' to stop tmux from interpreting it as a new command # ideally we should escape single ';' to stop tmux from interpreting it as a new command
# but that's probably too rare to care # but that's probably too rare to care