fix(tmux): avoid index error creating new window

And ensure new windows is created after the last one
This commit is contained in:
Yorick Barbanneau 2025-05-05 09:46:26 +02:00
parent 5e6fbc9eba
commit d355e9bc01
No known key found for this signature in database
GPG key ID: 4447A19BBEDB8DBA

View file

@ -104,7 +104,7 @@ tmux_hsplit() {
tmux_neww() {
local name="$1"
debug "execute neww with name '${name}'"
local command=(tmux new-window -t "$SESSION" -c "$CURRENT_PATH")
local command=(tmux new-window -t "${SESSION}:$" -c "$CURRENT_PATH" -a)
if [[ -n "$name" ]]; then
command+=(-n "$name")
fi