Skip to content

Commit 3de07de

Browse files
committed
refactor: remove unnecessary Runnable usages
1 parent ee69eed commit 3de07de

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/kotlin/com/github/lppedd/cc/completion/LookupEnhancer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ internal class LookupEnhancer(private val lookup: LookupImpl) : LookupListener,
176176
private fun invokeCompletion() {
177177
val project = lookup.project
178178
val editor = lookup.editor
179-
val command = Runnable {
179+
val command = {
180180
val invokedExplicitly = ApplicationManager.getApplication().isUnitTestMode
181181
CodeCompletionHandlerBase
182182
.createHandler(BASIC, invokedExplicitly, !invokedExplicitly, true)

src/main/kotlin/com/github/lppedd/cc/liveTemplate/CCTemplateEditingListener.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ internal class CCTemplateEditingListener : TemplateEditingAdapter() {
7575

7676
if (newOffset <= bodyOrFooterTypeRange.endOffset) {
7777
val editor = templateState.editor
78-
val action = Runnable {
78+
val action = {
7979
editor.document.deleteString(newOffset, bodyOrFooterTypeRange.endOffset)
8080
editor.moveCaretToOffset(newOffset)
8181
}
@@ -93,7 +93,7 @@ internal class CCTemplateEditingListener : TemplateEditingAdapter() {
9393
val document = editor.document
9494
val startOffset = max(scopeStart - 1, 0)
9595
val endOffset = min(scopeEnd + 1, document.textLength)
96-
val action = Runnable {
96+
val action = {
9797
document.deleteString(startOffset, endOffset)
9898
}
9999

src/main/kotlin/com/github/lppedd/cc/liveTemplate/CommitBaseCompleteMacro.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ internal abstract class CommitBaseCompleteMacro : Macro() {
4141
return@invokeLaterOnEdt
4242
}
4343

44-
val command = Runnable {
44+
val command = {
4545
@Suppress("UnstableApiUsage")
4646
CompletionServiceImpl.setCompletionPhase(CompletionPhase.NoCompletion)
4747
invokeCompletionHandler(project, editor)

src/main/kotlin/com/github/lppedd/cc/lookupElement/ShowMoreCoAuthorsLookupElement.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ internal class ShowMoreCoAuthorsLookupElement : CommitTokenLookupElement, Prefix
112112
TextRange(lineStart, lineEnd)
113113
}
114114

115-
val action = Runnable {
115+
val action = {
116116
editor.removeSelection()
117117
editor.replaceString(footerStart, footerEnd, text)
118118
}

0 commit comments

Comments
 (0)