nppexec icon indicating copy to clipboard operation
nppexec copied to clipboard

Extra internalID being reserved without a function?

Open Gitoffthelawn opened this issue 3 years ago • 4 comments

Thank you for the v0.7 release. Overall, it looks great.

I noticed that my keyboard shortcut for a NppExec macro no longer worked.

To get it to work, in Notepad++'s shortcuts.xml, I had to change:

<PluginCommand moduleName="NppExec.dll" internalID="22" Ctrl="yes" Alt="no" Shift="yes" Key="50" />

to:

<PluginCommand moduleName="NppExec.dll" internalID="23" Ctrl="yes" Alt="no" Shift="yes" Key="50" />

Simple enough. But note that in Notepad++'s Shortcut Mapper UI, there is now a blank line for NppExec after Help/About. Is this a little bug, or is it intentional? It's like NppExec is reserving an extra internalID that it is not using.

Gitoffthelawn avatar Jul 29 '21 10:07 Gitoffthelawn

Please find it explained here: https://github.com/d0vgan/nppexec/issues/42

d0vgan avatar Jul 29 '21 12:07 d0vgan

Thanks so much. Your explanation in #42 makes perfect sense. The only curiosity is the blank item in Notepad++'s Shortcut Mapper for NppExec. Do you happen to know what is causing that?

Gitoffthelawn avatar Jul 29 '21 12:07 Gitoffthelawn

I hardly recalled that the blank item in Notepad++'s Shortcut Mapper for NppExec has a special purpose. NppExec's Advanced Options has a check-box "Place to the Macros submenu". When it is checked, the NppExec's script menu items are moved from NppExec submenu to Notepad++'s Macro submenu. These script menu items include at least one menu item separator - right before the first script menu item. There can be more menu item separators added via NppExec's Advanced Options. And to be able to move them (these menu item separators) from NppExec submenu to Notepad++'s Macro submenu, they need to have menu item id that, in its turn, leads to an empty item in Notepad++'s Shortcut Mapper for NppExec. NppExec_script_menu_items_under_Macro NppExec_Shortcut_mapper

d0vgan avatar Jul 29 '21 16:07 d0vgan

Ah! You figured it out. Great job.

Would it make sense to add something like "Separator" or "Separator (do not use)" as a name string for those items? No big deal either way now that I understand what's going on, but other people might appreciate it (and I might forget!).

Gitoffthelawn avatar Jul 30 '21 00:07 Gitoffthelawn