From 41ad987b6b8e9b5d5762377adf9e45e7637e052f Mon Sep 17 00:00:00 2001 From: WMJ Date: Mon, 18 Jul 2022 15:24:41 +0800 Subject: [PATCH] - Fixed a bug caused scrollbar markers went wrong --- Codist/Margins/CommentMarginElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Codist/Margins/CommentMarginElement.cs b/Codist/Margins/CommentMarginElement.cs index 8a2f1931..ae94d24e 100644 --- a/Codist/Margins/CommentMarginElement.cs +++ b/Codist/Margins/CommentMarginElement.cs @@ -188,7 +188,7 @@ void DrawMarkers(DrawingContext drawingContext) { if (ClassificationBrushMapper.TryGetValue(c, out b) == false) { continue; } - var y = _ScrollBar.GetYCoordinateOfBufferPosition(new SnapshotPoint(snapshot, tag.Start)); + var y = _ScrollBar.GetYCoordinateOfBufferPosition(tag.TrackingSpan.GetStartPoint(snapshot)); if (lastY + HalfMarkSize > y && lastBrush == b) { // avoid drawing too many closed markers continue;