LineIndentProvider: add restriction on position
Part of #KT-22211
This commit is contained in:
+1
@@ -48,6 +48,7 @@ abstract class KotlinLikeLangLineIndentProvider : JavaLikeLangLineIndentProvider
|
|||||||
override fun getIndent(project: Project, editor: Editor, language: Language?, offset: Int): IndentCalculator? {
|
override fun getIndent(project: Project, editor: Editor, language: Language?, offset: Int): IndentCalculator? {
|
||||||
val factory = IndentCalculatorFactory(project, editor)
|
val factory = IndentCalculatorFactory(project, editor)
|
||||||
val currentPosition = getPosition(editor, offset)
|
val currentPosition = getPosition(editor, offset)
|
||||||
|
if (!currentPosition.matchesRule { it.isAt(Whitespace) && it.isAtMultiline }) return null
|
||||||
|
|
||||||
// ~~~ TESTING ~~~
|
// ~~~ TESTING ~~~
|
||||||
// println(debugInfo(currentPosition))
|
// println(debugInfo(currentPosition))
|
||||||
|
|||||||
Reference in New Issue
Block a user