How to intercept command from Tree-View package?


#1

Hello, I’m trying to write my first package and for part of it I need to detect when a directory is opened in the tree-view package. I see in the tree-view source they add commands like tree-view:expand-item, tree-view:recursive-expand-directory and a few others but I can’t seem to find a way to detect when these commands are done. Is there a way to detect when a folder is opened using commands that the tree view declares or should I be interacting with it in a different way? Thanks!


#2

What do you want to do when a directory is opened in the tree-view?


#3

The package I’m making is to resize the left panel automatically to not cut off any of the file names. I’ve already got it resizing when I hit a button, but getting it to do this every time a new folder opens is my goal.


#4

You could submit a PR to the tree-view package instead?


#5

when you double click on tree-view border it will adjust width based on open, closed folders. Not sure is it what you looking for but hope it would help.


#6

Sorry I think I realize I was going about this in the wrong way, thanks!