First menu item unexpectedly being called on startup
-
I’ve been playing around with https://github.com/deadem/notepad-pp-linter and discovered something odd has started happening (using notepad++ 8.5.6).
When I start notepad++ it behaves as though I’ve clicked the first menu entry for the plugin (which calls editConfig here https://github.com/deadem/notepad-pp-linter/blob/49586fd72d54bd068fc5e8b0d085b6bac360c3e1/plugin.cpp#L93 which opens the configuration file).
I have experimented a bit. It is ONLY the first menu entry - if I add a second one, it doesn’t get called. If I swap the order, the new first one gets called, and the 2nd one (editConfig) doesn’t get called.
Is this something that started in 8.5.6? Or is there some variable that I’m not initialising properly and is therefore doing different things at different times? Or A.N.Other thing?
-
Can you show us the code for how you add the second menu entry? In the code you provided, only one entry is visible.
I assume you add the second menu entry like this with 1:
setCommand(0, TEXT("&FirstMenuPoint"), firstFunction, NULL, false); setCommand(1, TEXT("&SecondMenuPoint"), secondFunction, NULL, false);
-
I tried both
setCommand(0, TEXT("&FirstMenuPoint"), firstFunction, NULL, false); setCommand(1, TEXT("&SecondMenuPoint"), secondFunction, NULL, false);
and
setCommand(0, TEXT("&SecondMenuPoint"), secondFunction, NULL, false); setCommand(1, TEXT("&FirstMenuPoint"), firstFunction, NULL, false);
In both cases, command entry 0 gets called before notepad++ has displayed any windows
-
@ThosRTanner I’ve tested ‘Linter’ with my N++ installation, and I didn’t experience this issue: no window opened before the main N++ window. I can only offer some suggestions. Have you tried deleting the N++ config.xml?
Additionally, I would suggest updating to the 8.5.7 version. -
This post is deleted! -
This post is deleted!