forked from qt-creator/qt-creator
TextEditor: Duplicate selection (Duplicate selection and comment)
New TextEditor action for duplicating current selection. Extended version of this feature creates commented duplications. Possible use cases: 1. No selection, cursor anywhere in text - Duplicity line 2. Simple selection - Duplicity selection 3. Block selection, without columns - Duplicity lines 4. Block selection, with columns - Duplicity selection Cursor position and selection stays unchanged. Works well with Undo action. First use case with no selection looks similar as copyLineDown, but difference is that copyLineDown moves current cursor position and select created line. This feature don't change cursor position. Because of this difference it is not possible to integrate this additions with copyLineDown. Quick intro: https://youtu.be/Fv6WdCnCLpo Change-Id: I7c36fca6e17de030cbd22cfa103c2ed672deabbc Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -144,6 +144,8 @@ const char UPPERCASE_SELECTION[] = "TextEditor.UppercaseSelection";
|
||||
const char LOWERCASE_SELECTION[] = "TextEditor.LowercaseSelection";
|
||||
const char CUT_LINE[] = "TextEditor.CutLine";
|
||||
const char COPY_LINE[] = "TextEditor.CopyLine";
|
||||
const char DUPLICATE_SELECTION[] = "TextEditor.DuplicateSelection";
|
||||
const char DUPLICATE_SELECTION_AND_COMMENT[] = "TextEditor.DuplicateSelectionAndComment";
|
||||
const char DELETE_LINE[] = "TextEditor.DeleteLine";
|
||||
const char DELETE_END_OF_WORD[] = "TextEditor.DeleteEndOfWord";
|
||||
const char DELETE_END_OF_WORD_CAMEL_CASE[] = "TextEditor.DeleteEndOfWordCamelCase";
|
||||
|
||||
Reference in New Issue
Block a user