@@ -100,6 +100,7 @@ TEditor = class(TObject)
100
100
fActiveLine: integer;
101
101
fDebugGutter: TDebugGutter;
102
102
fCurrentWord: AnsiString;
103
+ fCurrentHintReason : THandPointReason;
103
104
fCurrentEvalWord: AnsiString;
104
105
fIgnoreCaretChange: boolean;
105
106
fPreviousEditors: TList;
@@ -373,6 +374,7 @@ constructor TEditor.Create(const Filename: AnsiString; Encoding:TFileEncodingTyp
373
374
fUpdateLock := 0 ;
374
375
fSelChanged:=False;
375
376
fLineCount:=-1 ;
377
+ fCurrentHintReason := hprNone;
376
378
fLastMatchingBeginLine:=-1 ;
377
379
fLastMatchingEndLine:=-1 ;
378
380
fLastIdCharPressed := 0 ;
@@ -2993,7 +2995,7 @@ procedure TEditor.EditorMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Int
2993
2995
begin
2994
2996
kind := fParser.FindKindOfStatementOf(fFileName, s, p.Line);
2995
2997
2996
- if kind in [skVariable, skParameter] then begin // only show debug info of variables;
2998
+ if kind in [skVariable, skGlobalVariable, skLocalVariable, skParameter] then begin // only show debug info of variables;
2997
2999
if MainForm.Debugger.Reader.CommandRunning then
2998
3000
Exit;
2999
3001
@@ -3017,6 +3019,7 @@ procedure TEditor.EditorMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Int
3017
3019
// disable editor hint
3018
3020
Application.CancelHint;
3019
3021
fCurrentWord := ' ' ;
3022
+ fCurrentHintReason := Reason;
3020
3023
fText.Hint := ' ' ;
3021
3024
3022
3025
// disable page control hint
@@ -3071,12 +3074,13 @@ procedure TEditor.EditorMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Int
3071
3074
// Don't rescan the same stuff over and over again (that's slow)
3072
3075
// if (s = fCurrentWord) and (fText.Hint<>'') then
3073
3076
s:=trim(s);
3074
- if (s = fCurrentWord) then
3077
+ if (( s = fCurrentWord) and (fCurrentHintReason = Reason) ) then
3075
3078
Exit; // do NOT remove hint when subject stays the same
3076
3079
3077
3080
// Remove hint
3078
3081
CancelHint;
3079
3082
fCurrentWord := s;
3083
+ fCurrentHintReason := Reason;
3080
3084
3081
3085
// We are allowed to change the cursor
3082
3086
if (ssCtrl in Shift) then
@@ -3422,7 +3426,7 @@ function TEditor.HandpointAllowed(var MousePos: TBufferCoord; ShiftState: TShift
3422
3426
3423
3427
// Only allow in the text area...
3424
3428
if fText.GetPositionOfMouse(mousepos) then begin
3425
- if Assigned(GetErrorAtPosition(mousepos)) then begin
3429
+ if not MainForm.Debugger.Executing and Assigned(GetErrorAtPosition(mousepos)) then begin
3426
3430
Result := hprError;
3427
3431
Exit;
3428
3432
end ;
0 commit comments