mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 10:59:06 +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
|
||||
((sgmoDeDuplicateMarksOnOverflow in FOptions) and (vcnt > ColumnCount))
|
||||
then begin
|
||||
VCntU := 1;
|
||||
VCntU := 0;
|
||||
VCnt2 := 0;
|
||||
for j := 1 to MLine.Count - 1 do
|
||||
if MLine[j].ImageIndex <> MLine[j-1].ImageIndex then
|
||||
prev_iidx := low(integer);
|
||||
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
|
||||
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
|
||||
pprev_iidx := prev_iidx;
|
||||
prev_iidx := MLine[j].ImageIndex;
|
||||
end;
|
||||
|
||||
if (sgmoDeDuplicateMarks in FOptions) then begin
|
||||
vcnt := Min(vcntU, ColumnCount + MaxExtraMarksColums);
|
||||
|
Loading…
Reference in New Issue
Block a user