Rectable selection fixes #452
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!452
Loading…
Reference in a new issue
No description provided.
Delete branch "reejk/rectable-selection-tab"
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?
There is two changes related to rectangular selection with zero width.
1. When pressing Tab, tabulation inserts at selection column like there is multiple cursors https://github.com/icsharpcode/AvalonEdit/issues/397
2. When pressing Backspace, avoids cursor jumping up and losing lines from selection in result.
PR https://github.com/icsharpcode/AvalonEdit/pull/425 is also about this problem.
How to reproduce: Replace the text in the Sample with the text below. Select all the semicolons and press Backspace twice. Selection will lose the last line.
The root cause is the precision of mathematical calculations. The
HeightTree.GetVisualPositionFromNodemethod returns a number slightly smaller than whatTextView.GetVisualLineFromVisualTopexpects for the same line.The
totalHeightsum loses precision, and thistotalHeightis also the sum of other calculations. The more work you do with the editor, the lower the precision of these calculations. At some point, the rectangular selection may lose all the initially selected lines.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.