Menu

#8 using AppendNewLineAtEOF in SynEdit level with fShowSpecChar

open
nobody
None
5
2004-12-15
2004-12-15
Nashev
No

********
procedure UpdateScrollBars;
procedure DoShiftTabKey;

procedure DoHomeKey(Selection:boolean);

527a528,531
> // <<-- IC Nashev:
> function GetAppendNewLineAtEOF: Boolean;
> procedure SetAppendNewLineAtEOF(const
Value: Boolean);
> // -->> IC Nashev
protected
{$IFDEF SYN_CLX}
procedure Resize; override;
********
procedure SetAlwaysShowCaret(const Value:
Boolean);
procedure PrepareIdentChars(var IdentChars,
WhiteChars: TSynIdentChars);
public
616a621,624
> // <<-- IC Nashev:
> property AppendNewLineAtEOF: Boolean read
GetAppendNewLineAtEOF write Se
> // -->> IC Nashev
>
// Nashev begin: see copy of used TCustomControl
functionality
// property Canvas;

// Nashev end;
********
OnInserted := ListInserted;
OnPutted := ListPutted;
// OnScanRanges := ListScanRanges;
1187a1196,1198
> // <<-- IC Nashev:
> AppendNewLineAtEOF := False;
> // -->> IC Nashev
end;
{end}

fFontDummy := TFont.Create;
********
{begin}

if fShowSpecChar then
begin
2911,2912c2922,2927
< if not fWordWrap or (nLine = fLines.
Count)
< or not TSynEditStringList(Lines).
IsLineWraped(nLine)
---
> // <<-- IC Nashev
> if (not fWordWrap or not
TSynEditStringList(Lines).IsLineWraped(
> and ( AppendNewLineAtEOF or (nLine
<> fLines.Count) )
> // if not fWordWrap or (nLine = fLines.
Count)
> // or not TSynEditStringList(Lines).
IsLineWraped(nLine)
> // -->> IC Nashev
then begin
sLine := sLine + SynLineBreakGlyph;
Inc(nTokenLen);
********
// of the invalid area with the correct colors.
{begin}

if fShowSpecChar then
2964,2965c2979,2985
< if not fWordWrap or (nLine = fLines.Count)
< or not TSynEditStringList(Lines).
IsLineWraped(nLine) then
---
>
> // <<-- IC Nashev
> if (not fWordWrap or not
TSynEditStringList(Lines).IsLineWraped(nL
> and ( AppendNewLineAtEOF or (nLine <>
fLines.Count) ) then
> // if not fWordWrap or (nLine = fLines.
Count)
> // or not TSynEditStringList(Lines).
IsLineWraped(nLine) then
> // -->> IC Nashev
begin
if assigned(attr) and (attr = fHighlighter.
CommentAttribute) then
begin
********
if (Lines.Count > 1) then
ScanFrom(0);
end;
4711a4732,4738
> // IC Nashev:
> if fShowSpecChar and not AppendNewLineAtEOF
then
> // &#1085;&#1072;&#1076;&#1086; &#1087;&#1077;&#1088;&#1077;&#1088;&#1080;&#1089;&#1086;&#1074;&#1072;&#1090;&#1100; &#1080; &#1090;&#1091; &#1089;&#1090;&#1088;&#1086;&#1082;&#1091;, &#1074; &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1081;
&#1085;&#1072;&#1078;&#1080;&#1084;&#1072;&#1083;&#1080; Enter -
> // &#1095;&#1090;&#1086;&#1073; &#1086;&#1090;&#1086;&#1073;&#1088;&#1072;&#1079;&#1080;&#1090;&#1100; &#1090;&#1072;&#1084; &#1085;&#1086;&#1074;&#1099;&#1081; CR, &#1074;&#1077;&#1076;&#1100; &#1077;&#1089;&#1083;&#1080;
&#1086;&#1085;&#1072; &#1073;&#1099;&#1083;&#1072; &#1087;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1103;&#1103;,
> // &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1072; CR &#1090;&#1072;&#1084; &#1085;&#1077; &#1073;&#1099;&#1083;&#1086;, &#1080; &#1085;&#1077; &#1073;&#1099;&#1083;&#1086;
&#1085;&#1072;&#1088;&#1080;&#1089;&#1086;&#1074;&#1072;&#1085;&#1086;.
> InvalidateLines(Index, TopLine +
LinesInWindow)
> else
InvalidateLines(Index + 1, TopLine +
LinesInWindow);
4712a4740,4741
> //InvalidateLines(Index + 1, TopLine +
LinesInWindow);
> // -->> IC Nashev
InvalidateGutterLines(Index + 1, TopLine +
LinesInWindow);

if (eoAutoSizeMaxLeftChar in fOptions) then
********
else
Result := [#33..#255];
end;
9121a9151,9162
>
> // <<-- IC Nashev:
> function TCustomSynEdit.
GetAppendNewLineAtEOF: Boolean;
> begin
> Result := TSynEditStringList(fLines).
AppendNewLineAtEOF;
> end;
>
> procedure TCustomSynEdit.
SetAppendNewLineAtEOF(const Value: Boolean);
> begin
> TSynEditStringList(fLines).AppendNewLineAtEOF
:= Value;
> end;
> // -->> IC Nashev

{ TSynEditMark }

Discussion


Log in to post a comment.