diff --git a/rc/windowing/tmux.kak b/rc/windowing/tmux.kak index f5a8fda3..a433692c 100644 --- a/rc/windowing/tmux.kak +++ b/rc/windowing/tmux.kak @@ -18,6 +18,9 @@ define-command -hidden -params 2.. tmux-terminal-impl %{ tmux_args="$1" if [ "${1%%-*}" = split ]; then tmux_args="$tmux_args -t ${kak_client_env_TMUX_PANE}" + elif [ "${1%% *}" = new-window ]; then + session_id=$(tmux display-message -p -t ${kak_client_env_TMUX_PANE} '#{session_id}') + tmux_args="$tmux_args -t $session_id" fi shift # ideally we should escape single ';' to stop tmux from interpreting it as a new command