diff --git a/CHANGES b/CHANGES index ee9b8d8dc..0b31563a7 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,8 @@ Python 2.7 support dropped. - :issue:`312`: ci: Add tmux 3.2a to CI - chore: Update black to `21.6b0 `_ +- :issue:`271`: Fix select_window() by providing the session ID as + argument to -t. libtmux 0.8.5 (2020-10-25) -------------------------- diff --git a/libtmux/session.py b/libtmux/session.py index 5c3997266..0b19268bc 100644 --- a/libtmux/session.py +++ b/libtmux/session.py @@ -353,7 +353,10 @@ def select_window(self, target_window): assure ``-l``, ``-n``, ``-p`` work. """ - target = '-t%s' % target_window + # Note that we also provide the session ID here, since cmd() + # will not automatically add it as there is already a '-t' + # argument provided. + target = '-t%s:%s' % (self._session_id, target_window) proc = self.cmd('select-window', target)