IDEA-70389 Alt + Ctrl + I should adjust line indent on all lines, where selection exists

This commit is contained in:
Dmitry Batrak
2015-08-20 16:48:01 +03:00
parent c9081d2c7b
commit 42dc074fd1
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.util.DocumentUtil;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;
@@ -92,7 +93,7 @@ public class AutoIndentLinesHandler implements CodeInsightActionHandler {
codeStyleManager.adjustLineIndent(file, lineStart);
}
} else {
codeStyleManager.adjustLineIndent(file, new TextRange(startOffset, endOffset));
codeStyleManager.adjustLineIndent(file, new TextRange(DocumentUtil.getLineStartOffset(startOffset, document), endOffset));
}
}