[fixed] Editra reopen a tab for the same file

Report Bugs Here

[fixed] Editra reopen a tab for the same file

Postby vds2212 » Mon Nov 23, 2009 6:59 am

Dear Cody and Editra developers,

This is a minor weakness of Editra.

If you open a file using the Editra command line it try to reuse an existing tab that contains the referenced file.

But if you use different path that reference the same file (you change the case, use a relative path, use short notation path) it get confused and create a new tab for the same file.

Yours,
Vivian De Smedt
vds2212
User
 
Posts: 29
Joined: Mon Nov 17, 2008 2:44 pm

Re: Editra reopen a tab for the same file

Postby cody » Tue Nov 24, 2009 12:57 am

Hi,

I wouldn't say it is a weakness as much as it is a bug.

I have fixed the issue with relative paths today.

If you change the case then it is technically a different path. By default windows is case-insensitive but all other platforms are case sensitive. I suppose I could look into ignoring the case of paths when running on windows.

Could you elaborate more on what you mean by short notation path?


Thanks,

Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Editra reopen a tab for the same file

Postby vds2212 » Tue Nov 24, 2009 4:50 am

Hi Cody,

Thanks for your quick answer :-)

What I call the short notation is the 8.3 old dos notation still available for windows for example for:
Code: Select all
C:\Documents and Settings\vds\My Documents\editra.py

Is also in short notation:
Code: Select all
C:\DOCUME~1\vds\MYDOCU~1\editra.py


You can pass from the short notation to the long one using:
Code: Select all
win32api.GetLongPathName

and from the long to the short one using:
Code: Select all
win32api.GetShortPathName

Some time, some program still don't works well with space embedded into path and the short notation is a solution to that problem.

I mention it for the sake of completion. The previous synchronization problem is more an issue for me because it force me to stay with UltraEdit for Python debugging :-)

Vivian.
vds2212
User
 
Posts: 29
Joined: Mon Nov 17, 2008 2:44 pm

Re: Editra reopen a tab for the same file

Postby cody » Sat Dec 12, 2009 3:19 am

Hi,

Short names should be handled properly now when win32api is available. Could probably re-write the functionality of GetLongPathName in a local function to remove the dependancy on win32api but this will do for now.

Thanks,

Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Editra reopen a tab for the same file

Postby vds2212 » Sat Dec 12, 2009 1:15 pm

Thanks Cody,

I'm not sure you could have rewrite the GetLongFileName easily.

There is no standard mapping between short file name and long ones. If you have a bunch of long file names that starts with the same substring they short version are the same modulo a number at the end of 8 part.

Windows keep somewhere the mapping between these short names and the long ones but you have no way to guess the mapping since it depends of the history of creation of the file on the disk.

So your solution is probably the only one :-)

Yours,
Vivian De Smedt.
vds2212
User
 
Posts: 29
Joined: Mon Nov 17, 2008 2:44 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron