You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some users prefer to leave an instance of Notepad++ running in the background to avoid the brief wait for the NPP initial launch. Then they have their application/script file continually re-invoke Notepad++ to open some files in a specific way by using NPP's command line parameters. When they do so:
The fresh command line parameters are not being displayed in NPP's Debug Info... dialog.
More importantly, these fresh command line parameters are not being made available to plugins like PythonScript for custom command line parameter processing (with the -z option).
Steps to reproduce the issue
Have Notepad++ set at: Default (mono-instance) under the Multi-instance & Date section in Preferences.
Leave an instance of Notepad++ open or minimized.
Then launch Notepad++ with some new parameters either from a command line or from a batch file.
View the Debug Info... dialog in NPP. The new command line parameters are not being displayed in this dialog.
Use the PythonScript plugin console and execute: notepad.getCommandLine(). This will only report the original command line used to invoke the initial NPP process. This is since PythonScript is using GetCommandLine Windows API.
What is needed
Add a new message NPPM_GETCURRENTCMDLINE to the NPP API. The plugin authors can utilize this query to obtain the current command line string, and use it to process custom command line parameters that are being passed with the -z option.
Optionally, a new message NPPM_GETINITIALCMDLINE to obtain the initial command line string can also be added to the NPP API for complementarity.
Add a new notification NPPN_CMDLINECHANGED to the NPP API. When Notepad++ has been re-invoked, it can notify the plugins that a fresh command line string is available.
When the most recent command line string used to re-invoke NPP is not an empty string, display both the "Initial Command Line" and the "Current Command Line" in the Debug Info... dialog. This will be useful in providing technical support for NPP users.
Additional Info
Please see my comments in response to a user change request for my GotoLineCol plugin.
Issue
Some users prefer to leave an instance of Notepad++ running in the background to avoid the brief wait for the NPP initial launch. Then they have their application/script file continually re-invoke Notepad++ to open some files in a specific way by using NPP's command line parameters. When they do so:
-z
option).Steps to reproduce the issue
notepad.getCommandLine()
. This will only report the original command line used to invoke the initial NPP process. This is since PythonScript is using GetCommandLine Windows API.What is needed
-z
option.Additional Info
The text was updated successfully, but these errors were encountered: