mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 13:59:14 +02:00
IDE, SourceEditor: use SynEdits logical pos directly (already computed) rather than converting.
This commit is contained in:
parent
6974d8ea3d
commit
ec03c5273d
@ -6798,12 +6798,8 @@ begin
|
||||
end;
|
||||
|
||||
function TSourceEditor.GetWordAtCurrentCaret: String;
|
||||
var
|
||||
CaretPos: TPoint;
|
||||
begin
|
||||
CaretPos.Y := CurrentCursorYLine;
|
||||
CaretPos.X := CurrentCursorXLine;
|
||||
Result := GetWordFromCaret(ScreenToTextPosition(CaretPos));
|
||||
Result := GetWordFromCaret(FEditor.LogicalCaretXY);
|
||||
end;
|
||||
|
||||
function TSourceEditor.GetOperandFromCaret(const ACaretPos: TPoint): String;
|
||||
@ -6835,12 +6831,8 @@ begin
|
||||
end;
|
||||
|
||||
function TSourceEditor.GetOperandAtCurrentCaret: String;
|
||||
var
|
||||
CaretPos: TPoint;
|
||||
begin
|
||||
CaretPos.Y := CurrentCursorYLine;
|
||||
CaretPos.X := CurrentCursorXLine;
|
||||
Result := GetOperandFromCaret(ScreenToTextPosition(CaretPos));
|
||||
Result := GetOperandFromCaret(FEditor.LogicalCaretXY);
|
||||
end;
|
||||
|
||||
function TSourceEditor.GetWordFromCaret(const ACaretPos: TPoint): String;
|
||||
|
Loading…
Reference in New Issue
Block a user