Shift+F4 - HiEditor fails to open files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Shift+F4 - HiEditor fails to open files

Post by *JFierce7 »

Hello,
I'm using HiEditor from http://www.winasm.net/ as my external editor. This editor fails to open files specified with Shift+F4, while it opens files by F4 without problems.
This is probably partly HiEditor's fault, partly TC's. Here's my analysis:

1) F4 opens the file with its full path inside the external editor (to be checked with Process Explorer, for example). Everything's fine then.
2) Shift+F4 only uses the filename to call the external editor. Would it use the whole path as well, the editor would certainly find the file (however, see the remark below) - so this is something that could/should be changed in TC.
3) HiEditor, otoh, does not correctly set its "current" folder. If it would do this, it probably could find the file as well. (I guess, HiEditor should set the working path, because Notepad2 has the right path in an otherwise identical scenario).

Remark: An additional problem might arise because Shift+F4 always includes a '.' in the filename, even if there's no extension. F4, however, doesn't include the dot.

Regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually TC sets the current directory of the editor before calling it, so any editor should be able to open the file just by calling CreateFile(). Apparently HiEditor changes the directory by itself when starting, so the opening of the file fails. You should contact the author of HiEditor about this problem.
Author of Total Commander
https://www.ghisler.com
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

Done.

However, I'd still consider it a bug if TC behaves differently for F4/Shift+F4 after entering the file name. This includes the missing path as well as the ".".
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Shift+F4 passes exactly the name you type to the editor, it does not modify it in any way.
Author of Total Commander
https://www.ghisler.com
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

Hmm - that explains the "missing" path. The dot, however, must be appended somehow, as I do not enter it for a file like 'x' or so (some temporary note).

Anyway - it does not seem to matter. Although, for the sake of symmetry, I would consider this a bug. :-)
Post Reply