simple-term-menu icon indicating copy to clipboard operation
simple-term-menu copied to clipboard

Bad tabulation after 9

Open Greenmouse94 opened this issue 4 years ago • 4 comments
trafficstars

Hello and thank you for this very good module,

I have an issue when I have a number with 2 digits :

---------------------------------------------------------------------------------------
> [1] Select product                                                                                                                              
  [2] Select engagement                                                                                                                           
  [3] Select test                                                                                                                                 
  [4] Show finding(s)                                                                                                                             
  [5] See the product                                                                                                                             
  [6] See the engagement                                                                                                                          
  [7] See the test                                                                                                                                
  [8] See the finding                                                                                                                             
  [9] Import a scan                                                                                                                               
      [10]Blabla                                                                                                                                  
  [x] Exit 

As you can see the 10th number has a bad tabulation.

Best regards.

Greenmouse94 avatar Sep 15 '21 14:09 Greenmouse94

Thanks for your bug report. I can confirm the described behavior. I never tested using two keys because pressing one key already selects an entry. So currently, in this case, pressing 1 would always select the first entry. The 10th entry cannot be selected with a shortcut. So how would you like to use this feature? Perhaps, the menu should wait for more key presses if the selection is ambiguous.

IngoMeyer441 avatar Oct 13 '21 10:10 IngoMeyer441

I also wanted my menu to work this way, and encountered the same issue. One solution I thought back in the day was to add a little delay or wait that the menu could use "to buffer" user's input, if that makes any sense.

majezt1c avatar Oct 25 '21 10:10 majezt1c

Default selection is Next page at bottom. Shortcuts are defined as 0-9, or A-J (user definable?) Users then would press P or N to cycle forward or backward through the pages. Each shortcut would correlate with the page it is on, not the entire list.

Other shortcuts could be Shift-Enter/P for previous page Enter/N for next page

Midnex avatar Mar 17 '22 19:03 Midnex

Has this tabulation problem (once you get past nine objects there are extra spaces) been solved? I know about shortcuts; I just thought there would be a way to correct the extra spaces before the 10th and subsequent options.

allenweiss avatar Jan 05 '23 18:01 allenweiss