Rectangle selection rendering glitch with horizontal scrolling #424

Open
opened 2024-03-17 16:38:50 -05:00 by AngryCarrot789 · 3 comments
AngryCarrot789 commented 2024-03-17 16:38:50 -05:00 (Migrated from github.com)

The text editor has a lot of text in it, such that the horizontal scroll bar is visible. When there is no horizontal scrolling, even if the scroll bar is present, then the rendering is fine (a regular rectangle).

But when I start a rectangle selection while the horizontal scroll bar is slightly to the right, I get this:
image

I can't tell if this is intended or if it's just a visual bug, because it doesn't look quite right...

And when you scroll further to the right, it looks even weirder:
image

The text editor has a lot of text in it, such that the horizontal scroll bar is visible. When there is no horizontal scrolling, even if the scroll bar is present, then the rendering is fine (a regular rectangle). But when I start a rectangle selection while the horizontal scroll bar is slightly to the right, I get this: ![image](https://github.com/icsharpcode/AvalonEdit/assets/32274404/eeb15252-3588-4bb6-83a9-e275a7f33155) I can't tell if this is intended or if it's just a visual bug, because it doesn't look quite right... And when you scroll further to the right, it looks even weirder: ![image](https://github.com/icsharpcode/AvalonEdit/assets/32274404/04dfc728-bb5c-429a-8daa-9a00cbef59c5)
alex8900vbs commented 2025-02-11 14:53:40 -06:00 (Migrated from github.com)

have you solved it?

have you solved it?
alex8900vbs commented 2025-02-11 15:23:59 -06:00 (Migrated from github.com)

i solved this , in static IEnumerable<Rect> ProcessTextLines in BackgroundGeometryBuilder
change this
Rect extendSelection = new Rect(Math.Min(left, right) - textView.ScrollOffset.X, y, Math.Abs(right - left), line.Height);
on line 268

i solved this , in `static IEnumerable<Rect> ProcessTextLines` in `BackgroundGeometryBuilder` change this `Rect extendSelection = new Rect(Math.Min(left, right) - textView.ScrollOffset.X, y, Math.Abs(right - left), line.Height);` on line 268
christophwille commented 2025-04-13 03:31:02 -05:00 (Migrated from github.com)

That should be fixed in 6.3.1 via #435

That should be fixed in 6.3.1 via #435
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/AvalonEdit#424
No description provided.