mirror of https://gitlab.com/basile.b/dexed.git
fix #325 - Same module can be opened twice
This commit is contained in:
parent
2511e5a0a8
commit
76847765fb
|
@ -1153,12 +1153,6 @@ begin
|
|||
((aMessage[i] = '(') or (aMessage[i] = ':') or
|
||||
((aMessage[i] = '-') and (i < aMessage.length-5) and (aMessage[i..i+5] = '-mixin'))) then
|
||||
begin
|
||||
// absolute fname
|
||||
if ident.fileExists then
|
||||
begin
|
||||
getMultiDocHandler.openDocument(ident);
|
||||
exit(true);
|
||||
end;
|
||||
// relative fname if project file is the base path to a rel. fname
|
||||
absName := ExpandFileName(ident);
|
||||
if absName.fileExists then
|
||||
|
@ -1166,6 +1160,12 @@ begin
|
|||
getMultiDocHandler.openDocument(absName);
|
||||
exit(true);
|
||||
end;
|
||||
// absolute fname
|
||||
if ident.fileExists then
|
||||
begin
|
||||
getMultiDocHandler.openDocument(ident);
|
||||
exit(true);
|
||||
end;
|
||||
// if fname relative to project path
|
||||
if fProj <> nil then
|
||||
begin
|
||||
|
@ -1176,6 +1176,20 @@ begin
|
|||
exit(true);
|
||||
end;
|
||||
end;
|
||||
// finally try using pwd ...
|
||||
absName := expandFilenameEx(GetCurrentDir, ident);
|
||||
if absName.fileExists then
|
||||
begin
|
||||
getMultiDocHandler.openDocument(absName);
|
||||
exit(true);
|
||||
end;
|
||||
// ... and $HOME
|
||||
absName := expandFilenameEx(GetUserDir, ident);
|
||||
if absName.fileExists then
|
||||
begin
|
||||
getMultiDocHandler.openDocument(absName);
|
||||
exit(true);
|
||||
end;
|
||||
end
|
||||
// <assertion failure messg>@<filename>
|
||||
else if aMessage[i] = '@' then
|
||||
|
|
Loading…
Reference in New Issue