Changeset 113 for trunk/Forms/UFormMain.pas
- Timestamp:
- May 17, 2019, 10:32:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r108 r113 418 418 DebugStep: TDebugStep; 419 419 begin 420 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.SynEditTarget.SelStart );420 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.SynEditTarget.SelStart - 1); 421 421 if Assigned(DebugStep) then begin 422 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition ;422 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition + 1; 423 423 PageControlMain.TabIndex := 0; 424 424 end; … … 429 429 DebugStep: TDebugStep; 430 430 begin 431 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart );431 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1); 432 432 if Assigned(DebugStep) then begin 433 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition ;433 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition + 1; 434 434 PageControlMain.TabIndex := 1; 435 435 end; … … 521 521 BreakPoint: TBreakPoint; 522 522 begin 523 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart );523 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1); 524 524 if Assigned(DebugStep) then begin 525 525 BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); … … 554 554 if Core.CurrentTarget.State = rsStopped then begin 555 555 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 556 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart );556 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1); 557 557 Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 558 558 AProgramRun.Execute; 559 559 end else begin 560 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart );560 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1); 561 561 Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition); 562 562 end; … … 568 568 begin 569 569 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition); 570 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition ;571 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition ;570 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition + 1; 571 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition + 1; 572 572 if PageControlMain.TabIndex = 0 then FormSourceCode.SynEditSource.SetFocus; 573 573 if PageControlMain.TabIndex = 1 then FormTargetCode.SynEditTarget.SetFocus;
Note:
See TracChangeset
for help on using the changeset viewer.