Skip to content
Permalink
Browse files

Reapply SingleLineMode feature for SynEdit, which we need in the SQL …

…log panel
  • Loading branch information
ansgarbecker committed Nov 10, 2019
1 parent b97629b commit 30f54a56a9c2e702f1ed2c689192f21f4dc8de27
Showing with 5 additions and 0 deletions.
  1. +5 −0 components/synedit/Source/SynEdit.pas
@@ -709,6 +709,7 @@ TCustomSynEdit = class(TCustomControl)
protected
FGutterWidth: Integer;
FInternalImage: TSynInternalImage;
fSingleLineMode: boolean;
procedure HideCaret;
procedure ShowCaret;
procedure DoOnClearBookmark(var Mark: TSynEditMark); virtual;
@@ -1041,6 +1042,7 @@ TCustomSynEdit = class(TCustomControl)
property OnSearchNotFound: TCustomSynEditSearchNotFoundEvent
read FSearchNotFound write FSearchNotFound;
{$ENDIF}
property SingleLineMode: boolean read fSingleLineMode write fSingleLineMode;
end;

TSynEdit = class(TCustomSynEdit)
@@ -1386,6 +1388,7 @@ constructor TCustomSynEdit.Create(AOwner: TComponent);
FRedoList := TSynEditUndoList.Create;
FRedoList.OnAddedUndo := UndoRedoAdded;
FOrigRedoList := FRedoList;
fSingleLineMode := false;

{$IFDEF SYN_COMPILER_4_UP}
DoubleBuffered := False;
@@ -3732,6 +3735,8 @@ procedure TCustomSynEdit.PaintTextLines(AClip: TRect; const aFirstRow, aLastRow,
// line - the internal highlighter range might be wrong.
if nLine = 1 then
FHighlighter.ResetRange
else if fSingleLineMode then
fHighlighter.ResetRange
else
FHighlighter.SetRange(TSynEditStringList(Lines).Ranges[nLine - 2]);
FHighlighter.SetLineExpandedAtWideGlyphs(sLine, sLineExpandedAtWideGlyphs,

0 comments on commit 30f54a5

Please sign in to comment.
You can’t perform that action at this time.