Fix EAbort error when copying text from SynMemo without highlighter. See https://www.heidisql.com/forum.php?t=38906

This commit is contained in:
Ansgar Becker
2022-03-05 08:56:56 +01:00
parent 819699a79a
commit 49d527552a

View File

@@ -334,6 +334,12 @@ begin
Break;
end;
end;
// In case the combobox is empty:
if MemoText.Highlighter = nil then begin
FHighlighter := TSynGeneralSyn.Create(Self);
MemoText.Highlighter := FHighlighter;
end;
MemoText.SelStart := SelStart;
MemoText.SelLength := SelLength;
end;