Use right arrow to select/deselect in CliMultiMenu

For a menu where we only select one option right arrow is an okay-choice
for accept, but with multiple option selection toggling feels more
natural.
This commit is contained in:
Sebastian Lohff 2020-08-20 01:53:48 +02:00
parent d01024d1be
commit 12552d8e5b
1 changed files with 1 additions and 0 deletions

View File

@ -350,6 +350,7 @@ class CliMultiMenu(CliMenu):
def _register_extra_kb_cbs(self, kb):
@kb.add('space', filter=~is_searching)
@kb.add('right', filter=~is_searching)
def mark(event):
if self._pos not in self._multi_selected:
self._multi_selected.append(self._pos)