From 02f2f413b143fcfe24a1c1d26f440ffcf520cbf3 Mon Sep 17 00:00:00 2001 From: arafatkatze Date: Tue, 7 Jan 2025 18:57:46 +0400 Subject: [PATCH] Fixing and simplifying New Chat keybindings logic --- .../cody/edit/lenses/LensesService.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jetbrains/src/main/kotlin/com/sourcegraph/cody/edit/lenses/LensesService.kt b/jetbrains/src/main/kotlin/com/sourcegraph/cody/edit/lenses/LensesService.kt index 5ca7c63b2719..f67df2fd13af 100644 --- a/jetbrains/src/main/kotlin/com/sourcegraph/cody/edit/lenses/LensesService.kt +++ b/jetbrains/src/main/kotlin/com/sourcegraph/cody/edit/lenses/LensesService.kt @@ -65,14 +65,14 @@ class LensesService(val project: Project) { if (project.isDisposed) return@runInEdt // 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 })) - } + .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) } }