icsharpcode / AvalonEdit

The WPF-based text editor component used in SharpDevelop
http://avalonedit.net/
MIT License
1.85k stars 469 forks source link

[fix] Get right Column when use custom element replace text content. #417

Open SuperSuperPepper opened 10 months ago

SuperSuperPepper commented 10 months ago

If you want to use custom elements replace text content. example: I want to use custom elements to change some keywords by using the menu, button or other elements for my special feature. you will get the wrong caret position when you click textview . because GetVisualColumn doesn't calculate generator elements. so need to recalculate the column. this PR can fix #416