command line bug in editor2 version 2.6.0.5 (x2 lite)

Questions & Answers

Moderators: fgagnon, nikos, Site Mods

Post Reply
dam
New Member
Posts: 2
Joined: 2002 Aug 15, 18:23

command line bug in editor2 version 2.6.0.5 (x2 lite)

Post by dam »

I think I have run into a bug with the editor2 included with the last version of xplorer2_lite (1.1.0.3).  The about window shows version 2.6.0.5.

The problem occurs when using editor2 at the command line or from a batch file.  What happens is that if I try to load a file into editor2 without providing a full path editor2 looks for the file in the directory saved in the sxInitialFolder registry key.

for example:
with c:/some-folder as the current dir containing some-file

editor2 some-file

will give an error c:/another-folder/some-file does not not found
where c:/another-folder is the folder in the szInitialFolder key

editor c:/some-folder/some-file

works fine.

The unicode version (2.6.0.5) of editor2 included with xplorer2_pro does not seem to have this problem; although, when I was using both versions (with two sets of registry keys) it seemed that the problem happened with either version.

The fix was to clear out both sets of editor2 registry keys and replace the editor2 file in the xplorer2_lite dir with the unicode version.  So now there is only one set of keys in HKEY_CURRENT_USER\Software\Zab... for editor2UC and I am using only one version of editor2.

Later,
Daniel
User avatar
nikos
Site Admin
Site Admin
Posts: 15800
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

this is by design
ed2 "cd's" to the folder stored in sxInitialFolder
taa
New Member
Posts: 3
Joined: 2005 Nov 10, 16:50

Post by taa »

nikos wrote:this is by design
ed2 "cd's" to the folder stored in sxInitialFolder

Running editor2  2.5.0.5 non-unicode version, MOST of the time launching editor2 from the command line and opening a file in the current directory (no path specified) works just fine and other times it won't. I've not been able to discern a pattern as to when it works ok and when it doesn't. If it's by design then it's not always doing a cd to the sxInitialFolder. I would rather it NOT do this anyway since the majority of the time it works as I'd like (no path name needed).  Could this be made an option to NOT do the cd to sxInitialFolder when it's being run from the command line (assuming that editor2 can detect it's running from the command line).
taa
New Member
Posts: 3
Joined: 2005 Nov 10, 16:50

Post by taa »

Maybe I'm asking the wrong question: Do I just need to delete the sxInitialFolder registry value to have it work where I don't need to specify the full path?

Since it works MOST of the time the way I'd like, what is it that triggers whether the sxInitialFolder registry entry is created or used?
User avatar
nikos
Site Admin
Site Admin
Posts: 15800
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

the easier solution would be to turn "save settings on exit" off and then delete sxInitialFolder

if you are using ed2 within x2 you don't need to pass command lines etc, F3/F4 will do the job
taa
New Member
Posts: 3
Joined: 2005 Nov 10, 16:50

Post by taa »

I'll try working with that idea. Thanks!
Post Reply