Skip to content

Commit 4dd506e

Browse files
committed
Formatting execution after upgrading the spotless version
1 parent 1ed7244 commit 4dd506e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/kotlin/org/domaframework/doma/intellij/common/sql/directive/PercentDirectiveHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PercentDirectiveHandler(
3333
element,
3434
result,
3535
) { bind ->
36-
val beforeTextChars =
36+
val prevLeafCount =
3737
this.element.prevLeafs
3838
.takeWhile { prev -> prev.text != "%" }
3939
.toList()
@@ -53,7 +53,7 @@ class PercentDirectiveHandler(
5353
LookupElementBuilder
5454
.create(it)
5555
.withInsertHandler { context, _ ->
56-
val start = context.startOffset - beforeTextChars
56+
val start = context.startOffset - prevLeafCount
5757
val tail = context.tailOffset
5858
context.document.replaceString(start, tail, it)
5959
context.editor.caretModel.moveToOffset(start + it.length)

src/main/kotlin/org/domaframework/doma/intellij/formatter/SqlFormatPreProcessor.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import com.intellij.psi.TokenType
2727
import com.intellij.psi.impl.source.codeStyle.PreFormatProcessor
2828
import com.intellij.psi.util.PsiTreeUtil
2929
import com.intellij.psi.util.elementType
30-
import com.intellij.psi.util.endOffset
3130
import com.intellij.psi.util.prevLeafs
3231
import org.domaframework.doma.intellij.psi.SqlBlockComment
3332
import org.domaframework.doma.intellij.psi.SqlTypes

0 commit comments

Comments
 (0)