AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
694 stars 138 forks source link

Multi-caret editing on virtual space with EOL glyphs enabled breaks #427

Open Rekkonnect opened 1 month ago

Rekkonnect commented 1 month ago

Steps

  1. Run the demo project found in this repo (AvaloniaEdit.Demo)
  2. Enable EOL glyph view
  3. Begin multi-caret editing between lines that may be shorter than the position of the caret
  4. Begin typing

Expected

Correct placement of the characters for all lines

Actual

On the lines that are shorter than the position of the caret, the text is inserted by one position to the left than the correct position.

Example

https://github.com/AvaloniaUI/AvaloniaEdit/assets/8298332/23b234bb-9ea2-44af-9ce7-ece2b81baaa9

(This is not related to typing Greek characters as shown in the example)

Natestah commented 1 month ago

In a version of AvalonEdit (not AvaloniaEdit) I Implemented true multi caret support. It came together pretty easily and i ultimately replaced this Rectangular Selection with multiple selections when dragging the box. Hoping someday that can see the light of open source