tmux-python / tmux-python/libtmux
select_pane not working correctly with multiple sessions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 127
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Description
The code of select_pane is:
if target_pane in ["-l", "-U", "-D", "-L", "-R"]:
proc = self.cmd("select-pane", "-t%s" % self.window_id, target_pane)
else:
proc = self.cmd("select-pane", "-t%s" % target_pane)
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)
?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the select_pane implementation shown in the issue and trace how self.cmd passes its target to self.server.cmd. Reproduce window.select_pane(3) with multiple sessions, then verify that the generated target retains the session and window context and selects pane 3 in the requested session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100