Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut Mapper: Filter by Shortcuts doesn't work well for Scintilla Commands #10486

Closed
pryrt opened this issue Sep 1, 2021 · 0 comments · Fixed by #14732
Closed

Shortcut Mapper: Filter by Shortcuts doesn't work well for Scintilla Commands #10486

pryrt opened this issue Sep 1, 2021 · 0 comments · Fixed by #14732
Labels

Comments

@pryrt
Copy link
Contributor

pryrt commented Sep 1, 2021

Description of the Issue

In v8.1.3, you added the ability to search by shortcuts, which is great. In all my tests in the main menu, macros, run commands, and plugin commands, it works as expected; but in the scintilla commands, it doesn't find anything from the

(Filtering the Scintilla Commands by some part of their SCI_ command name works just fine. Just not the new filtering by shorcut)

Steps to Reproduce the Issue

  1. Settings > Shortcut Mapper > Scintilla Commands

    • Filter by +V does not find SCI_PASTE - Ctrl+V
    • Filter by +X does not find SCI_CUT - Ctrl+X
    • Filter by +C does not find SCI_COPY - Ctrl+C
    • Filter by +] does not find SCI_PARADOWN - Ctrl+] or SCI_PARADOWN_EXTEND - Ctrl+Shift+]
      image
    • Filter by Shift does not find anything, even though many of the SCI commands have Shift in the keystrokes
  2. To confirm that filtering does work with that style of filtering

    • Settings > Shortcut Mapper > Main Menu: Filter = +N finds NEW Ctrl+N, 1st Tab Ctrl+Numpad 1, and many others
    • Settings > Shortcut Mapper > Macros: Filter = +S finds Trim Trailing's Alt+Shift+S
    • Settings > Shortcut Mapper > Run commands: Filter = +F finds all of the default run commands Alt+F# shortcuts
    • Settings > Shortcut Mapper > Plugin Commands:
      • since there's no default commands, set Base64 Encode to Ctrl+Alt+Shift+]
      • filter by +], and it finds the newly-specified Base64 Encode
        image
    • Filter by Shift in all the menus but Scintilla Commands finds all the shortcuts with the shift modifier

Expected Behavior

I expected step 1 to work similar to step 2, finding entries by shortcut as well as by

Actual Behavior

The filter is empty (shows nothing) on any of the tests in step 2

Debug Information

Notepad++ v8.1.4   (64-bit)
Build time : Aug 21 2021 - 13:04:59
Path : C:\usr\local\apps\npp\npp.8.1.4.portable.x64\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit) 
OS Version : 2009
OS Build : 19042.1165
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll 

or

Notepad++ v8.1.3   (64-bit)
Build time : Aug 10 2021 - 00:29:32
Path : C:\usr\local\apps\npp\npp.8.1.3.portable.x64\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit) 
OS Version : 2009
OS Build : 19042.1165
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
molsonkiko added a commit to molsonkiko/notepad-plus-plus that referenced this issue Feb 17, 2024
Fix notepad-plus-plus#12557, notepad-plus-plus#10486, notepad-plus-plus#14743
1. Fix: The shortcut mapper will filter Scintilla Commands by keycombo(s).
    Previously it only filtered Scintilla Commands by name,
    even though it filtered every other type of command by keycombo as well.
2. Rather than requiring that at least one field for a command
    match the entire contents of the Filter text box, the Filter text box
    will be split into a list of words, each of which must be matched by
    at least one field of the command.

    EXAMPLES:
    1. Consider a plugin command named "do thing" with plugin "BlahLint" and keycombo "Alt+G"
        Filters that match:
        - "lint do +" (the "+" is matched by "alt+g")
        - "+G thing blah"
        Filters that *do not* match:
        - "lint foo +g" ("foo" is not in any field)
        - "thing alt quz" ("quz" is not in any field)
    2. Consider a Scintilla command named "foo baz" with keycombos "Alt+H or Ctrl+Shift+Q"
        Filters that match:
        - "baz or" (the "or" is matched by "Alt+H or Ctrl+Shift+Q")
        - "+q foo"
        Filters that *do not* match:
        - "+q +z" ("+z" is not in any field)
        - "quz"
        - "baz Tab" ("tab" is not in any field)
    3. Consider any other type of command named "cute kitty" with keycombo "Alt+K"
        Filters that match:
        - "alt k" matches ("k" is matched by "kitty" *and* "alt+k")
        - "kit alt"
        Filters that *do not* match:
        - "cute q" ("q" is not in any field)
        - "z kit"
@donho donho added the accepted label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants