Editing mode fix and documentation scrolling #138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prompt toolkit deprecated setting the editing mode via the
enable_vi_mode
kwarg on key manager creation. The editing mode is now directly passed to theApplication
instantiation based on the bool instead.Additionally, I've enabled mouse support to switch between the default and docs buffers on click and allowed for scrolling in the docs buffer. I've also added a keybinding on
F9
to switch between the buffers. I'm not sure which key is best to toggle back and forth, perhaps there are some standards that vim/emacs have that we could bind this to instead.Fix for #74
Note: Enabling mouse support in prompt_toolkit seems to have the side effect that the terminals built in text highlighting/selection no longer works. I verified this behavior by looking at pyvim which also does the same thing. While switching between the buffers with mouse clicks and scrolling the docs with the scroll wheel is very natural, losing text selection might not be the best customer experience.
@jamesls @JordonPhillips