choose active window index after a close ?

11 views
Skip to first unread message

M Kelly

unread,
Nov 4, 2021, 9:58:45 AM11/4/21
to tmux-users
Hi,

If I have many windows open in tmux and I close one (exit the shell), it does not seem consistent which other window I end up in (active).
Often it is the next highest window, but sometimes it is one before that.
Is there a logic to this I can control ?
I have tried adding a hook for window-close but it does not seem to work for me ?
A hook for pane-exited does get run when I exit a shell - but I cannot seem to determine properly the correct window_index to land on.
I am using renumber-windows on and a base-index of 1.
Anyone have suggestions ?
If I could I would want the target window to be the next highest one before the close, or in other words to have it be the same window_index after the renumber - unless it was the highest numbered window.

thx always for awesome tmux,
-m

Nicholas Marriott

unread,
Nov 4, 2021, 10:19:01 AM11/4/21
to M Kelly, tmux-users
It should be top window on stack, so the one you were using most recently.



--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/55b49e51-db4a-48dd-a7bc-9ecd9b8d4eafn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages