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
I was building an app displaying a tree of Tmux sessions, windows, and panes, with panes as leaf nodes. One of the panes is special and I want the leaf node representing that pane selected when the tree is initially displayed. However, select_node() did not deliver the effect I needed.
I tried to build a minimal reproduction to illustrate what works and what does not.
The following code works well. Leaf node n0 gets selected:
Further debugging showed that in the 2nd example, self.n0.line is -1 before select_node() but becomes 1 after select_node(), and adding another select_node() call properly selects n0:
[21:20:57] INFO tree_node_selection.py:15
Before 1st selectoin: n0.line = -1
[21:20:57] INFO tree_node_selection.py:17
After 1st selectoin: n0.line = 1
Is this expected? Do I need some sort of refreshing/redrawing in order to achieve what I need?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was building an app displaying a tree of Tmux sessions, windows, and panes, with panes as leaf nodes. One of the panes is special and I want the leaf node representing that pane selected when the tree is initially displayed. However,
select_node()
did not deliver the effect I needed.I tried to build a minimal reproduction to illustrate what works and what does not.
The following code works well. Leaf node
n0
gets selected:This one, however, does not get
n0
selected:Further debugging showed that in the 2nd example,
self.n0.line
is-1
beforeselect_node()
but becomes1
afterselect_node()
, and adding anotherselect_node()
call properly selectsn0
:Logs:
Is this expected? Do I need some sort of refreshing/redrawing in order to achieve what I need?
Beta Was this translation helpful? Give feedback.
All reactions