hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.25k stars 430 forks source link

Paste by number not working for last item #2621

Closed KristjanLaane closed 2 months ago

KristjanLaane commented 4 months ago

Describe the bug Cannot quick-paste last item in the list by pressing the corresponding digit image

To Reproduce

  1. "Search for Numbers" setting is disabled
  2. Call a menu with global shortcut with command:
    
    copyq:
    menu("YourTabName")

![image](https://github.com/hluk/CopyQ/assets/1708294/7a47ba8f-c8e8-4d9f-8d21-27498e71e225)

4. Press the digit of the last item on the menu (assuming less than 10 items), which in this is 4
5. Instead of pasting, number 4 is put into the search box like so:
![image](https://github.com/hluk/CopyQ/assets/1708294/ed4ba904-1a5e-4532-885a-804ad2104083)

**Root cause guess**
I'm guessing you are using the 0-based index in the implementation for digit auto-activation or the threshold is off by 1 for some other reason in a conditional evaluation that gates digit activation...

**Version, OS and Environment**
 - Application Version 7.1.0
 - OS Windows
hluk commented 2 months ago

Thanks for the report! Fixed in #2691. The fix will be available in the next release.