Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tree] Fix tree widget mouse handling #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LinuCC
Copy link

@LinuCC LinuCC commented May 3, 2018

Instead of only listening to list.key(), which ignores mouse-clicks,
we use the lists own select event to re-propagate the trees select
event.
This way the mouse-clicks also trigger the select.
Since the existing options.keys are also passed to the blessed.list()
and thus influence its select event, they should behave exactly the
way they did til now.

Instead of only listening to `list.key()`, which ignores mouse-clicks,
we use the `list`s own select event to re-propagate the `tree`s select
event.
This way the mouse-clicks also trigger the `select`.
Since the existing `options.keys` are also passed to the `blessed.list()`
and thus influence its `select` event, they should behave exactly the
way they did til now.
@lirantal
Copy link
Collaborator

lirantal commented Sep 2, 2018

@LinuCC we can continue working on this PR

@LinuCC
Copy link
Author

LinuCC commented Feb 21, 2019

@lirantal is there anything I can do to get this fix merged?

@lirantal
Copy link
Collaborator

Wasn't aware that this is the finished version :-)
What's a good way to test it to make sure we're not breaking anything? Do we have some uses for this case in examples/ that I can run and test it?

@LinuCC
Copy link
Author

LinuCC commented Feb 21, 2019

Thank you for the resopnse!
I have only verified this on my own non-public project, my bad ;)
I will have a look at the examples this evening to come up with some test cases.

@lirantal
Copy link
Collaborator

I don't want to block this off if you fixed it and believe you got it right. I'd be happy if you could quickly test it out with some edge cases and let's push it in.

Ping me when you are ready :)

@LinuCC
Copy link
Author

LinuCC commented Feb 21, 2019

Welp, I assumed passing all the keys to blessed.list will handle the selection, but it does not;
it uses the keys param differently.
In this PR, only enter works to select an item (besides the now working mouse clicks) instead of arbitrarily specifiable keys.
I will need to change some things around to make this work.

@lirantal
Copy link
Collaborator

Thanks for looking into it more deeply.
I'm happy to merge if you're up for fixing it up

@LinuCC
Copy link
Author

LinuCC commented Feb 21, 2019

Will do once I have time! Won't take a year again, I promise ;)

@lirantal
Copy link
Collaborator

No worries, there's no rush.
Take the weekend to relax and don't burn out ❤️

@yboujraf
Copy link

Any feedback.

Best regards,

@LinuCC
Copy link
Author

LinuCC commented Sep 13, 2020

Uh, right, testing this thing.
I am kind off busy now and I personally don't need this feature anymore, so I guess we can close it if nobody else is interested in this feature.

Will do once I have time! Won't take a year again, I promise ;)

Well this aged like milk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants