Closed ScoreUnder closed 2 years ago
The active_menu_index
change was opportunistic:
_selected_index
was never mentioned anywhere else, so I removed it_menu_index_to_displayed_index
active_displayed_index
, I used that instead of repeating the viewport update codeThanks for your contribution! The code changes look good to me and the emacs bindings do not clash with vim bindings, so this is definitely a good addition. Probably, most users are used to Emacs bindings from the Bash defaults.
The
active_menu_index
change was opportunistic:
_selected_index
was never mentioned anywhere else, so I removed it- we had duplicated effort with a loop whose results had already been cached in
_menu_index_to_displayed_index
- since I added a setter for
active_displayed_index
, I used that instead of repeating the viewport update code
Thanks for your fix. This was old code that unintentionally survived code restructuring. Earlier versions did not have the dict _menu_index_to_displayed_index
.
This makes the home key (or the emacs/bash-like ctrl+a) scroll to the top of the list, and the end key (or ctrl+e) scroll to the bottom.