Skip to content

Commit

Permalink
🚸 fix constant re-rendering of code vision in jetbrains
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Mar 15, 2024
1 parent f5305ab commit 7955821
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ class AutocompleteService(private val project: Project) {
cancelCompletion(pendingCompletion!!)
pendingCompletion = null
}
editor.inlayModel.getInlineElementsInRange(0, editor.document.textLength).forEach { it.dispose() }
editor.inlayModel.getBlockElementsInRange(0, editor.document.textLength).forEach { it.dispose() }
editor.inlayModel.getInlineElementsInRange(0, editor.document.textLength).forEach {
if (it.renderer is ContinueCustomElementRenderer) {
it.dispose()
}
}
editor.inlayModel.getBlockElementsInRange(0, editor.document.textLength).forEach {
if (it.renderer is ContinueMultilineCustomElementRenderer) {
it.dispose()
}
}
}
}

0 comments on commit 7955821

Please sign in to comment.