[WIP] Add SwapLinesUp/Down commands with Alt+Up/Down #90
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!90
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/swap_lines_command"
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?
Feature
Swap the lines of selection with the adjucent one.
This is same as Alt+Up/Down in Visual Studio, Ctrl+Shift+Up/Down in Sublime Text, etc.
Sample
And with selection.
Issue
I'm now stuck with how to implement "selection restoration". I want to preserve the state of selection after executing the commands as I examplified above. In current implementation, the selection is cleared.
I've uploaded my trial implementation for "selection restoration". It sometime works well, but sometime doesn't work. Someone knows?
I would like to see this sort of functionality added to AvalonEdit and I believe I found the issue with why the selection is getting cleared. But I don't believe it's possible for me to make changes to this existing pull request.
If I were to open a new pull request with the updates that maintains the selection/caret position when moving lines up/down is this something you would consider merging or is this sort of functionality something you think should belong in the application layer rather than in the edit control?
Pull request closed