Steps to reproduce:
- Copy notepad.exe from Windows folder to C:\Program.exe
- Set a custom editor in Configuration -> Options -> Operation -> Edit/View to one that resides in C:\Program Files\, like C:\Program Files (x86)\PSPad editor\PSPad.exe. Note that even if you use the UI button to select a file, that path will be listed without quotes.
- Press F4 on any file.
- Notepad.exe will open instead of your editor, telling you something about invalid parameters.
- Use command line wmic process where name="program.exe" get commandline to verify TC is at fault, it tried to call C:\Program Files (x86)\PSPad editor\PSPad.exe c:\mytest.txt, without quotes.
Manually add quotes to editor location entry. Imho this cannot be expected from the user, since the GUI even offers a button to choose the file which does not take care of this issue.
Background:
Is explained in the link above - when paths to be executed have spaces, Windows tries to guess which part is executable and which part is parameter. Bad software can place itself as C:\Program.exe (or another likely location) and get called even by trusted applications that try to call other trusted applications in the wrong way.