|
|
|
@ -45,11 +45,13 @@ class PreviewFloatingToolbarProvider : AbstractFloatingToolbarProvider(PREVIEW_E
|
|
|
|
|
editor: Editor, |
|
|
|
|
parentDisposable: Disposable |
|
|
|
|
) { |
|
|
|
|
val project = editor.project ?: return |
|
|
|
|
val project = editor.project |
|
|
|
|
if (project != null && isPreviewCompatible(project)) { |
|
|
|
|
val listener = PreviewEditorToolbarVisibilityUpdater(component, project, editor) |
|
|
|
|
editor.caretModel.addCaretListener(listener, parentDisposable) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
internal class PreviewEditorToolbarVisibilityUpdater( |
|
|
|
|
private val toolbar: FloatingToolbarComponent, |
|
|
|
|