mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 00:17:18 +01:00
LCL-GTK2: Fix TMemo.SelText. Issue #32583, patch from accorp.
git-svn-id: trunk@56138 -
This commit is contained in:
parent
8095d05aee
commit
cf9ad3cd97
@ -38,6 +38,7 @@ type
|
||||
public
|
||||
//property Sorted: boolean read FSorted write SetSorted;
|
||||
property Owner: TWinControl read FOwner;
|
||||
property QueueCursorMovePos: Integer read FQueueCursorMove;
|
||||
property QueueSelLength: Integer read FQueueSelLength;
|
||||
end;
|
||||
{$ELSE}
|
||||
|
||||
@ -328,6 +328,7 @@ end;
|
||||
class function TGtk2WSCustomMemo.GetSelStart(const ACustomEdit: TCustomEdit
|
||||
): integer;
|
||||
var
|
||||
MemoStrings: TGtk2MemoStrings;
|
||||
TextView: PGtkTextView;
|
||||
TextBuffer: PGtkTextBuffer;
|
||||
TextMark: PGtkTextMark;
|
||||
@ -339,6 +340,11 @@ begin
|
||||
if not WSCheckHandleAllocated(ACustomEdit, 'GetSelStart') then
|
||||
Exit;
|
||||
|
||||
MemoStrings := TCustomMemo(ACustomEdit).Lines as TGtk2MemoStrings;
|
||||
Result := MemoStrings.QueueCursorMovePos;
|
||||
if Result > 0 then
|
||||
Exit;
|
||||
|
||||
TextView := PGtkTextView(GetWidgetInfo({%H-}Pointer(ACustomEdit.Handle), False)^.CoreWidget);
|
||||
TextBuffer := gtk_text_view_get_buffer(TextView);
|
||||
TextMark := gtk_text_buffer_get_insert(TextBuffer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user