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

Add support for scrolling sidebar panes with j/k #328

Merged
merged 1 commit into from
Feb 13, 2019
Merged

Add support for scrolling sidebar panes with j/k #328

merged 1 commit into from
Feb 13, 2019

Conversation

craftyguy
Copy link
Contributor

@craftyguy craftyguy commented Feb 12, 2019

This adds support for scrolling the variable, stack, and breakpoint
panes with the 'j' and 'k' keys. This functionality is disabled by
default, and can be enabled with a new config option in the config
dialog.

@craftyguy
Copy link
Contributor Author

I could see great possibility in using something similar to this patch for adding/overriding any number of key bindings in the application, so I tried to keep that possibility in mind when writing this.

I'm very new to the pudb codebase (first look was last night) , so if there's a better way to implement this and/or some refactoring of this patch is needed, let me know!

@craftyguy
Copy link
Contributor Author

I guess another way to write this patch is to get rid of the SignalWrap methods I added and use rhs_scroll_{up,down} to decide whether or not to send the key up/down events based on the config option.. but this would leave the signal wired up for listening to 'j' and 'k' at all times (even if the scroll option was 'disabled')

@inducer
Copy link
Owner

inducer commented Feb 12, 2019

but this would leave the signal wired up for listening to 'j' and 'k' at all times (even if the scroll option was 'disabled')

Fine by me (and totally worth it for the simpler logic, iMO).

@craftyguy
Copy link
Contributor Author

@inducer Thanks for the feedback! I have modified this MR to use the simpler behavior, and handle the application of the config in the up/down methods

pudb/debugger.py Outdated Show resolved Hide resolved
This adds support for scrolling the variable, stack, and breakpoint
panes with the 'j' and 'k' keys. This functionality is disabled by
default, and can be enabled with a new config option in the config
dialog.
@inducer inducer merged commit 1bae453 into inducer:master Feb 13, 2019
@craftyguy craftyguy deleted the jk_sb_nav branch February 13, 2019 18:24
@aude aude mentioned this pull request Nov 26, 2019
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.

2 participants