Skip to content

Commit

Permalink
Fix Ghost Text and CodeLens issue in Jetbrains
Browse files Browse the repository at this point in the history
  • Loading branch information
arafatkatze committed Dec 31, 2024
1 parent f3fe8b6 commit 898b1c8
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ class LensesService(val project: Project) {

runInEdt {
if (project.isDisposed) return@runInEdt
CodyEditorUtil.getSelectedEditors(project).forEach { editor ->
CodeVisionInitializer.getInstance(project)
.getCodeVisionHost()
.invalidateProvider(
CodeVisionHost.LensInvalidateSignal(
editor, EditCodeVisionProvider.allEditProviders().map { it.id }))
}
// Find the specific editor matching the file
CodyEditorUtil.getAllOpenEditors()
.find { editor -> editor.virtualFile == vf }
?.let { matchingEditor ->
CodeVisionInitializer.getInstance(project)
.getCodeVisionHost()
.invalidateProvider(
CodeVisionHost.LensInvalidateSignal(
matchingEditor, EditCodeVisionProvider.allEditProviders().map { it.id }))
}
}
listeners.forEach { it.onLensesUpdate(vf, codeLens) }
}
Expand Down

0 comments on commit 898b1c8

Please sign in to comment.