You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If calling it with a pane index (e.g. window.select_pane(3)) the resulting command will be select-pane -t3. This will result in self.server.cmd('select-pane -t3').
=> It will always change the pane in the session number 1.
Shouldn't there be some kind of further target description like select-pane -t $3:@9.3 (change to pane 3 in session 3, window9)
?
The text was updated successfully, but these errors were encountered:
session = None
sessions = self._server.attached_sessions
if len(sessions) > 1:
log.info('There are more than 1 sessions active. Unable to detect active one.')
elif len(sessions) == 1:
session = sessions[0]
else:
log.info('No active sessions found.')
session.attached_window.select_pane(3)
I use only one client attached to one session, which I make sure is true.
The session is always correct (the one I am active in).
However, running select_pane(3) on the attached window always switches the pane in one specific session (even when I am active in another and the session variable is correct.
which will probably end up in calling tmux select-pane -t3.
=> This does not switch the pane in the active session window, but in another one.
I just tested a bit. When I run the shell command tmux select-pane -t3 in any session it correctly switches the pane.
Could it be that, because the python program (doing the switching) is running in another session, it always switches panes in that session?
^ I just tested above theory: and yes, that is the case.
=> I think it would be wise to always pass the session_id and window_id with the -t argument!?
The code of
select_pane
is:If calling it with a pane index (e.g.
window.select_pane(3)
) the resulting command will beselect-pane -t3
. This will result inself.server.cmd('select-pane -t3')
.=> It will always change the pane in the session number 1.
Shouldn't there be some kind of further target description like
select-pane -t $3:@9.3
(change to pane 3 in session 3, window9)?
The text was updated successfully, but these errors were encountered: