AvaloniaUI / AvaloniaEdit

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

CustomMargin renders incorrectly when scrolling #442

Closed xanthome closed 3 months ago

xanthome commented 3 months ago

https://github.com/AvaloniaUI/AvaloniaEdit/blob/934f022406334b95813ecb9040b9e8864b81e1ac/src/AvaloniaEdit.Demo/CustomMargin.cs#L115

is fixed with: double y = visualLine.VisualTop - TextView.VerticalOffset + visualLine.Height / 2;

clicked-line10-no-scroll clicked-line10-scrolled-down clicked-line10-scrolled-down-fixed
danipen commented 3 months ago

cc @mgarstenauer can you please check this?

danipen commented 3 months ago

I was able to open a new PR for this. Please @mgarstenauer take a look if you can. Thanks!