There is nothing built in. Maybe you could try doing something with the window-close hook.
On Wed, 11 Dec 2024, 14:37 miostreams, <m.iostre...@gmail.com> wrote: > Is it possible to change the default behavior so that the next window is > selected when the current window is closed? > > Scenario > > - Create 4 windows with ssh sessions. > - From the 4th window, exit the ssh session. > - tmux automatically moves to the last window used (3rd window). > > I have tried using 'detach-on-destroy next', but that does not seem to > provide the expected behavior: > > set -g detach-on-destroy next > > Thank you > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion, visit > https://groups.google.com/d/msgid/tmux-users/b98dfd68-b48a-4dc7-8b4f-3debece81b20n%40googlegroups.com > <https://groups.google.com/d/msgid/tmux-users/b98dfd68-b48a-4dc7-8b4f-3debece81b20n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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+unsubscr...@googlegroups.com. To view this discussion, visit https://groups.google.com/d/msgid/tmux-users/CAEdLfcEBEDjiG9G89fkRx_fD08NSRrLAjqufCR1V-QgdhfpyMA%40mail.gmail.com.