mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 22:59:21 +02:00
SynEdit: fix MarksGutter deduplication
This commit is contained in:
parent
73cb3d87f4
commit
fca464e951
@ -191,14 +191,23 @@ begin
|
|||||||
if (FOptions * [sgmoDeDuplicateMarks, sgmoDeDuplicateMarksKeepTwo] <> []) or
|
if (FOptions * [sgmoDeDuplicateMarks, sgmoDeDuplicateMarksKeepTwo] <> []) or
|
||||||
((sgmoDeDuplicateMarksOnOverflow in FOptions) and (vcnt > ColumnCount))
|
((sgmoDeDuplicateMarksOnOverflow in FOptions) and (vcnt > ColumnCount))
|
||||||
then begin
|
then begin
|
||||||
VCntU := 1;
|
VCntU := 0;
|
||||||
VCnt2 := 0;
|
VCnt2 := 0;
|
||||||
for j := 1 to MLine.Count - 1 do
|
prev_iidx := low(integer);
|
||||||
if MLine[j].ImageIndex <> MLine[j-1].ImageIndex then
|
pprev_iidx := low(integer);
|
||||||
|
for j := 0 to MLine.Count - 1 do begin
|
||||||
|
if (not MLine[j].Visible) or
|
||||||
|
(MLine[j].IsBookmark and (not FBookMarkOpt.GlyphsVisible))
|
||||||
|
then
|
||||||
|
continue;
|
||||||
|
if MLine[j].ImageIndex <> prev_iidx then
|
||||||
inc(VCntU) // Uniq
|
inc(VCntU) // Uniq
|
||||||
else
|
else
|
||||||
if (j=1) or (MLine[j].ImageIndex <> MLine[j-2].ImageIndex) then
|
if (j=1) or (MLine[j].ImageIndex <> pprev_iidx) then
|
||||||
inc(VCnt2); // sgmoDeDuplicateMarksKeepTwo
|
inc(VCnt2); // sgmoDeDuplicateMarksKeepTwo
|
||||||
|
pprev_iidx := prev_iidx;
|
||||||
|
prev_iidx := MLine[j].ImageIndex;
|
||||||
|
end;
|
||||||
|
|
||||||
if (sgmoDeDuplicateMarks in FOptions) then begin
|
if (sgmoDeDuplicateMarks in FOptions) then begin
|
||||||
vcnt := Min(vcntU, ColumnCount + MaxExtraMarksColums);
|
vcnt := Min(vcntU, ColumnCount + MaxExtraMarksColums);
|
||||||
|
Loading…
Reference in New Issue
Block a user