AvalonEdit icon indicating copy to clipboard operation
AvalonEdit copied to clipboard

Swap lines command

Open dgosbell opened this issue 3 years ago • 0 comments

Feature

Swap the lines of selection with the adjucent one. (based off the work done in #90) This now correctly maintains the current selection and caret position and it has been tested with undo/redo

This is same as Alt+Up/Down in Visual Studio, Ctrl+Shift+Up/Down in Sublime Text, etc.

Sample

zzzz
xx<caret/>xx
wwww

     ↓ Alt+Up ↓

xx<caret/>xx
zzzz
wwww

And with selection.

zzzz
xxx<selection>yyy
yyyy</selection>xxxx
wwww

     ↓ Alt+Up ↓

xxx<selection>yyy
yyyy</selection>xxxx
zzzz
wwww

dgosbell avatar Jun 25 '21 09:06 dgosbell