From 0fb99f217afe69a8fbe68ba893827ba9a23af6dd Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 26 Jul 2020 21:07:42 +0200 Subject: [PATCH] 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. --- rc/windowing/tmux.kak | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rc/windowing/tmux.kak b/rc/windowing/tmux.kak index 1be3f8b9..8e4c7134 100644 --- a/rc/windowing/tmux.kak +++ b/rc/windowing/tmux.kak @@ -16,6 +16,9 @@ define-command -hidden -params 2.. tmux-terminal-impl %{ exit fi tmux_args="$1" + if [ "${1%%-*}" = split ]; then + tmux_args="$tmux_args -t ${kak_client_env_TMUX_PANE}" + fi shift # ideally we should escape single ';' to stop tmux from interpreting it as a new command # but that's probably too rare to care