zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.56k stars 179 forks source link

Improve `Run Command` with environment variables containing spaces #757

Closed lifenjoiner closed 7 months ago

lifenjoiner commented 7 months ago

Align with Win + R, for convenience. Test example: %ProgramFiles%.

zufuliu commented 7 months ago

all ExpandEnvironmentStringsEx() + ExtractFirstArgument() requires similar change.

case IDC_SEARCHEXE: could use:

ExtractFirstArgument(arg1, arg1, arg2);
ExpandEnvironmentStringsEx(arg1, COUNTOF(arg1));
ExpandEnvironmentStringsEx(arg2, COUNTOF(arg2));
zufuliu commented 7 months ago

Committed changes as ca521610a8115625ca8be15282ecb3d4acc72dd7, applied similar change to metapath, kept ExpandEnvironmentStringsEx() for lpParameters as the document for SEE_MASK_DOENVSUBST says:

Expand any environment variables specified in the string given by the lpDirectory or lpFile member.

lifenjoiner commented 7 months ago

Great! Careless me.