Basile B.,
there is a fix for this issue in Synedit. Have a look at this OnShowHint procedure:
procedure TEditorFile.ShowHint(Sender: TObject; HintInfo: PHintInfo);
var
cp, tp, p1, p2: TPoint;
r: TRect;
begin
cp := HintInfo^.CursorPos;
DebugLn(Format('~~~ ShowHint: cp.x=%d cp.y=%d', [cp.x, cp.y]));
tp := fEditor.PixelsToLogicalPos(cp);
if (tp.x > 0) and (tp.y > 0) then
HintInfo^.HintStr := Format('Cursor at x=%d y=%d', [tp.x, tp.y])
else
HintInfo^.HintStr := '';
p1 := fEditor.RowColumnToPixels(tp);
DebugLn(Format('~~~ ShowHint: p1.x=%d p1.y=%d', [p1.x, p1.y]));
tp.x := tp.x+1;
tp.y := tp.y+1;
p2 := fEditor.RowColumnToPixels(tp);
DebugLn(Format('~~~ ShowHint: p2.x=%d p2.y=%d', [p2.x, p2.y]));
r.Left := p1.x;
r.Top := p1.y;
r.Right := p2.x;
r.Bottom := p2.y;
HintInfo^.CursorRect := r;
// TODO: ReshowTimeout funktioniert nicht
// HintInfo^.ReshowTimeout := 500;
end;
I've set the HintInfo.CursorRect to the char the mouse is on. If the mouse leaves this are the hint is reshown again (this proc is called again for the new cursor position).