mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 18:59:21 +02:00
DBG: do not open virtual unit twice.
git-svn-id: trunk@32723 -
This commit is contained in:
parent
8daf1dbf4a
commit
240ec1a82b
@ -1258,7 +1258,7 @@ begin
|
||||
then Editor := SourceEditorManager.SourceEditorIntfWithFilename(NewSource.Filename);
|
||||
|
||||
// jump editor to execution line
|
||||
Flags := [jfAddJumpPoint];
|
||||
Flags := [jfAddJumpPoint, jfSearchVirtualFullPath];
|
||||
if (FCurrentBreakPoint = nil) or (FCurrentBreakPoint.AutoContinueTime = 0)
|
||||
then include(Flags, jfFocusEditor);
|
||||
i := SrcLine;
|
||||
|
11
ide/main.pp
11
ide/main.pp
@ -64,6 +64,8 @@ uses
|
||||
LCLProc, LCLMemManager, LCLType, LCLIntf, LConvEncoding, LMessages, ComCtrls,
|
||||
FileUtil, LResources, StdCtrls, Forms, Buttons, Menus, Controls, GraphType,
|
||||
HelpIntfs, Graphics, ExtCtrls, Dialogs, InterfaceBase, UTF8Process,
|
||||
//
|
||||
LazUTF8,
|
||||
// codetools
|
||||
FileProcs, CodeBeautifier, FindDeclarationTool, LinkScanner, BasicCodeTools,
|
||||
Laz_XMLCfg, CodeToolsStructs, CodeToolManager, CodeCache, DefineTemplates,
|
||||
@ -14990,6 +14992,7 @@ function TMainIDE.DoJumpToCodePosition(ActiveSrcEdit: TSourceEditorInterface;
|
||||
var
|
||||
SrcEdit, NewSrcEdit: TSourceEditor;
|
||||
AnEditorInfo: TUnitEditorInfo;
|
||||
s: String;
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
if NewSource=nil then begin
|
||||
@ -15020,6 +15023,14 @@ begin
|
||||
then begin
|
||||
// jump to other file -> open it
|
||||
ActiveUnitInfo := Project1.UnitInfoWithFilename(NewSource.Filename);
|
||||
if (ActiveUnitInfo = nil) and (Project1.IsVirtual) and (jfSearchVirtualFullPath in Flags)
|
||||
then begin
|
||||
s := AppendPathDelim(GetTestBuildDirectory);
|
||||
if LazUTF8.UTF8LowerCase(copy(NewSource.Filename, 1, length(s))) = LazUTF8.UTF8LowerCase(s)
|
||||
then ActiveUnitInfo := Project1.UnitInfoWithFilename(copy(NewSource.Filename, 1 + length(s), length(NewSource.Filename)), [pfsfOnlyVirtualFiles]);
|
||||
end;
|
||||
|
||||
|
||||
AnEditorInfo := nil;
|
||||
if ActiveUnitInfo <> nil then
|
||||
AnEditorInfo := GetAvailableUnitEditorInfo(ActiveUnitInfo, Point(NewX,NewY), NewTopLine);
|
||||
|
@ -123,7 +123,9 @@ type
|
||||
jfFocusEditor,
|
||||
jfMarkLine,
|
||||
jfMapLineFromDebug,
|
||||
jfDoNotExpandFilename);
|
||||
jfDoNotExpandFilename,
|
||||
jfSearchVirtualFullPath
|
||||
);
|
||||
TJumpToCodePosFlags = set of TJumpToCodePosFlag;
|
||||
|
||||
{ TMainIDEInterface }
|
||||
|
Loading…
Reference in New Issue
Block a user