View Issue Details

IDProjectCategoryView StatusLast Update
00287952.x IDE BugsCode EditorPublic2018-06-29 17:17
ReporterAlexander BorupAssigned ToAlan Savage 
PriorityLowSeveritySuggestionReproducibility100%
Status ClosedResolutionFixed 
Product Version 
Target VersionFixed in Version2.1.3 
Summary0028795: Code Editor: Unindent at caret, not whole line
DescriptionSimilar to how indenting works at caret->end-of-block range, unindenting should also only affect at this range (up to the first indent on the left of the caret).
In this example, | denotes the caret.

enum example {
    field1 = 1 << 0,. . . . . . . . . |// describe field
    field2 = 1 << 1,. . . . . . . . . |// describe field
}

Indenting here causes everything to the right of the caret to be indented once (// describe field).
Unindenting instead affects the whole line, causing field to be unindented.
It should instead only affect everything to the right of the caret and up the nearest indent to the left of the caret, meaning deindenting in the example (which is a 2-line column selection) will produce:

enum example {
    field1 = 1 << 0,. . . . . |// describe field
    field2 = 1 << 1,. . . . . |// describe field
}

instead of...
enum example {
field1 = 1 << 0,. . . . . . . . . . . |// describe field
field2 = 1 << 1,. . . . . . . . . . . |// describe field
}

But if the caret is here...
enum example {
    field1 = 1 << |0,. . . . . . . . . // describe field
}
then it deindents the whole line, because the first indent to the left of the caret precedes "field1".
TagsNo tags attached.
2.x IDE Found In2.1.3.273
2.x Runtime Found In2.1.3.189
2.x IDE Verified In2.1.3.273
2.x Runtime Verified In2.1.3.189

Relationships

duplicate of 0019142 ClosedAlan Savage Suggestion: Code Editor: Shift + Tab should decrease the indent at the cursor position 

Activities

Alan Savage

2018-02-12 14:59

Developer   ~0057688

resolved in red, see duplicate bugs