Skip to content

Commit

Permalink
[input-] refine cmdpalette interface #2195
Browse files Browse the repository at this point in the history
for inputPalette(multiple=True):
  - Enter to accept current input selections
  - Space to add current selection and continue selecting
  • Loading branch information
saulpw committed Dec 29, 2023
1 parent cc2e096 commit 766c449
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions visidata/features/cmdpalette.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ def _draw_palette(value):

if tabitem < 0 and palrows:
_ , topitem = palrows[0]
bindings['^J'] = make_acceptor(topitem[value_key], multiple=multiple)
bindings['^J'] = make_acceptor(topitem[value_key])
if multiple:
bindings[' '] = make_acceptor(topitem[value_key], multiple=multiple)
elif item and i == tabitem:
bindings['^J'] = make_acceptor(item[value_key], multiple=multiple)
bindings['^J'] = make_acceptor(item[value_key])
if multiple:
bindings[' '] = make_acceptor(item[value_key], multiple=multiple)
attr = colors.color_menu_spec

match_summary = formatter(m, item, trigger_key) if item else ' '
Expand Down

0 comments on commit 766c449

Please sign in to comment.