Skip to content

Commit 326acc0

Browse files
Merge pull request #435 from garstenauer/fix-rect-selection-ignores-scrolloffset
Fix: Rectangular selection ignores scroll offset
2 parents a579b7d + ffc1278 commit 326acc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ICSharpCode.AvalonEdit/Rendering/BackgroundGeometryBuilder.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ static IEnumerable<Rect> ProcessTextLines(TextView textView, VisualLine visualLi
261261
} else {
262262
right = visualLine.GetTextLineVisualXPosition(lastTextLine, segmentEndVC);
263263
}
264+
265+
left -= scrollOffset.X;
266+
right -= scrollOffset.X;
264267
Rect extendSelection = new Rect(Math.Min(left, right), y, Math.Abs(right - left), line.Height);
265268
if (!lastRect.IsEmpty) {
266269
if (extendSelection.IntersectsWith(lastRect)) {

0 commit comments

Comments
 (0)