LineIndentProvider: add restriction on position

Part of #KT-22211
This commit is contained in:
Dmitry Gridin
2020-05-29 12:33:28 +07:00
parent c0d7e565bc
commit 8e7bbf1780
@@ -48,6 +48,7 @@ abstract class KotlinLikeLangLineIndentProvider : JavaLikeLangLineIndentProvider
override fun getIndent(project: Project, editor: Editor, language: Language?, offset: Int): IndentCalculator? {
val factory = IndentCalculatorFactory(project, editor)
val currentPosition = getPosition(editor, offset)
if (!currentPosition.matchesRule { it.isAt(Whitespace) && it.isAtMultiline }) return null
// ~~~ TESTING ~~~
// println(debugInfo(currentPosition))