Check-in [e74a31c95f]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bugfix: reset the ColIndex when starting a new line.
Timelines: family | ancestors | descendants | both | lazarus
Files: files | file ages | folders
SHA1: e74a31c95ffc2169f580ebfb6c4c5e5162a825f8
User & Date: tinus 2014-08-06 21:11:52
Context
2014-08-07
03:50
The Wide Diff highlighter is done (for now; inline diffs can be done later). check-in: abecf9f927 user: tinus tags: lazarus
2014-08-06
21:11
Bugfix: reset the ColIndex when starting a new line. check-in: e74a31c95f user: tinus tags: lazarus
20:53
First attempt at using our own wide diff highlighter (which fails with a Range Check Error). check-in: 2ccce4c882 user: tinus tags: lazarus
Changes

Changes to src/synhighlighterdiffwide.pas.

212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

230
231
232
233
234
235
236
      AddColDef(FContentWidth, hsContent);
      AddColDef(1, hsSpace);
      AddColDef(1, hsMarkerEdited);
      AddColDef(1, hsSpace);
      AddColDef(5, hsLineNumber);
      AddColDef(2, hsSpace);
      AddColDef(FContentWidth, hsContent);
      FColIndex := 0;
      // set the token to the entire line, and set the styler to HeaderAttri
      SetToken(1, -1, hsHeader);
    end;
    '.': begin // divider
      // set the token to the entire line, and set the styler to DividerAttri
      SetToken(1, -1, hsDivider);
    end;
    ' ', '0'..'9': begin // a diff line
      FLineType := ' ';
      // set the token to the first 5 chars, and set the styler to LineNumberAttri

      SetToken(1, 5, hsLineNumber);
    end;
    else begin // unknown
      FLineType := '?';
      // set the token to the entire line, and set the styler to UnknownAttri
      SetToken(1, -1, hsUnknown);
    end;







<










>







212
213
214
215
216
217
218

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
      AddColDef(FContentWidth, hsContent);
      AddColDef(1, hsSpace);
      AddColDef(1, hsMarkerEdited);
      AddColDef(1, hsSpace);
      AddColDef(5, hsLineNumber);
      AddColDef(2, hsSpace);
      AddColDef(FContentWidth, hsContent);

      // set the token to the entire line, and set the styler to HeaderAttri
      SetToken(1, -1, hsHeader);
    end;
    '.': begin // divider
      // set the token to the entire line, and set the styler to DividerAttri
      SetToken(1, -1, hsDivider);
    end;
    ' ', '0'..'9': begin // a diff line
      FLineType := ' ';
      // set the token to the first 5 chars, and set the styler to LineNumberAttri
      FColIndex := 0;
      SetToken(1, 5, hsLineNumber);
    end;
    else begin // unknown
      FLineType := '?';
      // set the token to the entire line, and set the styler to UnknownAttri
      SetToken(1, -1, hsUnknown);
    end;