[fix] Get right Column when use custom element replace text content. #417
No reviewers
Labels
No labels
Area-Accessibility
Area-Build
Area-CodeCompletion
Area-Document
Area-Documentation
Area-Editing
Area-Folding
Area-Highlighting
Area-i18n
Area-Indentation
Area-NetFx
Area-Rendering
Area-Search
Area-Snippets
dependencies
duplicate
Feedback Needed
help wanted
invalid
Issue-Bug
Issue-Discussion
Issue-Enhancement
Issue-Performance
Issue-Question
on-hold
Resolution-Answered
Resolution-By Design
Resolution-Duplicate
Resolution-Fixed
Resolution-Won't Fix
Up-for-Grabs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-icsharpcode/AvalonEdit!417
Loading…
Reference in a new issue
No description provided.
Delete branch "SuperSuperPepper/master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
I tested your fix using ICSharpCode.AvalonEdit.Sample which contains the
ImageElementGeneratorand without your fix clicking right of an inserted image puts the caret into the correct location. With your fix, however, the exact problem occurs that you described in your original issue.Maybe there is something wrong with your custom element generator? Hard to say, without access to your code. Please take a look at our sample code. Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.