-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explore
: add more less
key bindings and add Transition::None
(#…
…14468) # Description The `explore` command is `less`-like, but it's missing the `Emacs` keybindings for up/down and PageUp/PageDown as well as the "q" to quit out. When I looked into adding those additional keybindings, I noticed there was a lot of duplicated code in the various views, so I refactored the code into a new `trait CursorMoveHandler`. I also noticed that there was an existing `TODO: should we add a noop transition instead of doing Option<Transition> everywhere?` comment in the code. I went ahead and implemented a new `Transition::None`, and that made the new `trait CursorMoveHandler` code MUCH cleaner, in addition to making some of the old code a little cleaner as well. # User-Facing Changes Users that are used to the keybindings for `less` should feel much more comfortable using `explore`. # Tests + Formatting Unfortunately, there aren't any existing tests for the `explore` command, so I didn't know where I should add new tests to cover my code changes. --------- Co-authored-by: paulie4 <[email protected]> Co-authored-by: Darren Schroeder <[email protected]>
- Loading branch information
1 parent
3d5f853
commit 88d27fd
Showing
10 changed files
with
322 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.