mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 13:40:29 +02:00
Cocoa: improve Lookup Word in TCocoaFullControlEdit.attributedSubstringForProposedRange_actualRange()
This commit is contained in:
parent
9297084337
commit
d59051c6f5
@ -460,6 +460,16 @@ var
|
|||||||
attribs.release;
|
attribs.release;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure setActualRange;
|
||||||
|
begin
|
||||||
|
if aRange.location >= (LW_LOCATION_BASE/2) then begin
|
||||||
|
actualRange^:= LWParamsToRange( params );
|
||||||
|
end else begin
|
||||||
|
actualRange^.location:= aRange.location;
|
||||||
|
actualRange^.length:= textWord.length;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:= nil;
|
Result:= nil;
|
||||||
|
|
||||||
@ -468,7 +478,7 @@ begin
|
|||||||
|
|
||||||
initParams;
|
initParams;
|
||||||
initTextWord;
|
initTextWord;
|
||||||
actualRange^:= LWParamsToRange( params );
|
setActualRange;
|
||||||
Result:= getAttributeWord;
|
Result:= getAttributeWord;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user