Skip to content

Commit 180b965

Browse files
authored
Merge pull request #78 from domaframework/renovate/com.diffplug.spotless-7.x
Update plugin spotless to v7.0.3
2 parents c9601a4 + 4dd506e commit 180b965

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
2929
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
3030
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
3131
grammarkit= { id = "org.jetbrains.grammarkit", version.ref = "grammarkit" }
32-
spotless = { id = "com.diffplug.spotless", version = "7.0.2" }
32+
spotless = { id = "com.diffplug.spotless", version = "7.0.3" }

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)