Fix: Rectangular selection ignores scroll offset #435

Merged
mgarstenauer merged 1 commit from fix-rect-selection-ignores-scrolloffset into master 2025-04-12 13:26:07 -05:00
mgarstenauer commented 2025-03-29 04:23:22 -05:00 (Migrated from github.com)

An AvaloniaEdit user has discovered a problem with rectangular selection when virtual space is enabled. See https://github.com/AvaloniaUI/AvaloniaEdit/issues/472.

I provided a fix for AvaloniaEdit: https://github.com/AvaloniaUI/AvaloniaEdit/pull/496

AvalonEdit shows the same problem. This PR implements the fix for AvalonEdit.

Details:
When a selection extends beyond the visual line into the "virtual space" then the BackgroundGeometryBuilder creates two segments per line. One for the visible text, and one for the virtual space.

The segment for the virtual space didn't apply the scroll offset. This is now fixed.

An `AvaloniaEdit` user has discovered a problem with rectangular selection when virtual space is enabled. See https://github.com/AvaloniaUI/AvaloniaEdit/issues/472. I provided a fix for `AvaloniaEdit`: https://github.com/AvaloniaUI/AvaloniaEdit/pull/496 `AvalonEdit` shows the same problem. This PR implements the fix for `AvalonEdit`. Details: When a selection extends beyond the visual line into the "virtual space" then the `BackgroundGeometryBuilder` creates two segments per line. One for the visible text, and one for the virtual space. The segment for the virtual space didn't apply the scroll offset. This is now fixed.
siegfriedpammer commented 2025-04-12 13:26:17 -05:00 (Migrated from github.com)

Thank you for your contribution!

Thank you for your contribution!
Sign in to join this conversation.
No description provided.