mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:19:18 +02:00
synedit: Paste: first check for synedit format then request it
git-svn-id: trunk@23795 -
This commit is contained in:
parent
0c7ac3484f
commit
048dcb82c4
@ -852,20 +852,25 @@ var
|
|||||||
ip: PInteger;
|
ip: PInteger;
|
||||||
len: LongInt;
|
len: LongInt;
|
||||||
begin
|
begin
|
||||||
|
Result := false;
|
||||||
Clear;
|
Clear;
|
||||||
Result := AClipboard.GetFormat(ClipboardFormatId, FMemStream);
|
FTextP := nil;
|
||||||
// Check for embedded text
|
// Check for embedded text
|
||||||
FTextP := GetTagPointer(synClipTagText);
|
if AClipboard.HasFormat(ClipboardFormatId) then begin
|
||||||
if FTextP <> nil then begin
|
Result := AClipboard.GetFormat(ClipboardFormatId, FMemStream);
|
||||||
len := GetTagLen(synClipTagText);
|
FTextP := GetTagPointer(synClipTagText);
|
||||||
if len > 0 then
|
if FTextP <> nil then begin
|
||||||
(FTextP + len - 1)^ := #0
|
len := GetTagLen(synClipTagText);
|
||||||
else
|
if len > 0 then
|
||||||
FTextP := nil;
|
(FTextP + len - 1)^ := #0
|
||||||
|
else
|
||||||
|
FTextP := nil;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
// Normal text
|
// Normal text
|
||||||
if (FTextP = nil) and AClipboard.HasFormat(CF_TEXT) then begin
|
if (FTextP = nil) and AClipboard.HasFormat(CF_TEXT) then begin
|
||||||
FText:= AClipboard.AsText;
|
Result := true;
|
||||||
|
FText := AClipboard.AsText;
|
||||||
if FText <> '' then begin
|
if FText <> '' then begin
|
||||||
FTextP := @FText[1];
|
FTextP := @FText[1];
|
||||||
ip := GetTagPointer(synClipTagExtText);
|
ip := GetTagPointer(synClipTagExtText);
|
||||||
|
Loading…
Reference in New Issue
Block a user