From 49d527552a50c9aebec24cab2a1becc2feaaa775 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 5 Mar 2022 08:56:56 +0100 Subject: [PATCH] Fix EAbort error when copying text from SynMemo without highlighter. See https://www.heidisql.com/forum.php?t=38906 --- source/texteditor.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/texteditor.pas b/source/texteditor.pas index ce63e3b9..839b49cd 100644 --- a/source/texteditor.pas +++ b/source/texteditor.pas @@ -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;