mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-27387: skip line comment offset when calculating indent in 'case'
This commit is contained in:
+2
-1
@@ -204,7 +204,8 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
while (!position.isAtEnd()) {
|
||||
if (currLanguage == Language.ANY || currLanguage == null) currLanguage = position.getLanguage();
|
||||
if (position.isAt(Colon)) {
|
||||
SemanticEditorPosition afterColon = getPosition(position.getEditor(), position.getStartOffset()).after().afterOptional(Whitespace);
|
||||
SemanticEditorPosition afterColon = getPosition(position.getEditor(), position.getStartOffset())
|
||||
.after().afterOptionalMix(Whitespace, LineComment);
|
||||
if (getPosition(position.getEditor(), position.getStartOffset()).isAfterOnSameLine(SwitchCase, SwitchDefault)) {
|
||||
return afterColon.getStartOffset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user