forked from qt-creator/qt-creator
TextEditor: improve sort selected lines
Try to get a sensible scope when there is no selection when sorting lines. Use the indent level of the current block and select all blocks that are not empty with the same indent level around that block before sorting the lines. Change-Id: I68cbd95f95a0cc4425a0339b992225c3946a6858 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -157,7 +157,7 @@ const char INSERT_LINE_ABOVE[] = "TextEditor.InsertLineAboveCurrentLine";
|
||||
const char INSERT_LINE_BELOW[] = "TextEditor.InsertLineBelowCurrentLine";
|
||||
const char UPPERCASE_SELECTION[] = "TextEditor.UppercaseSelection";
|
||||
const char LOWERCASE_SELECTION[] = "TextEditor.LowercaseSelection";
|
||||
const char SORT_SELECTED_LINES[] = "TextEditor.SortSelectedLines";
|
||||
const char SORT_LINES[] = "TextEditor.SortSelectedLines";
|
||||
const char CUT_LINE[] = "TextEditor.CutLine";
|
||||
const char COPY_LINE[] = "TextEditor.CopyLine";
|
||||
const char ADD_SELECT_NEXT_FIND_MATCH[] = "TextEditor.AddSelectionNextFindMatch";
|
||||
|
||||
Reference in New Issue
Block a user