mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
editor code preview: clean & update after bulk change
GitOrigin-RevId: bcd4e7dea20455734ce36fa1f2bcf13730924db2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
791341314c
commit
858e86bb68
+4
-6
@@ -4,8 +4,8 @@ package com.intellij.refactoring.extractMethod.newImpl.inplace
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.editor.LogicalPosition
|
||||
import com.intellij.openapi.editor.event.BulkAwareDocumentListener
|
||||
import com.intellij.openapi.editor.event.DocumentEvent
|
||||
import com.intellij.openapi.editor.event.DocumentListener
|
||||
import com.intellij.openapi.editor.event.VisibleAreaListener
|
||||
import com.intellij.openapi.editor.ex.util.EditorUtil
|
||||
import com.intellij.openapi.util.Disposer
|
||||
@@ -39,12 +39,10 @@ class EditorCodePreview private constructor(val editor: Editor): Disposable {
|
||||
|
||||
private var popups: List<CodeFragmentPopup> = emptyList()
|
||||
|
||||
private val documentListener = object : DocumentListener {
|
||||
private val documentListener = object : BulkAwareDocumentListener.Simple {
|
||||
override fun documentChanged(event: DocumentEvent) {
|
||||
if (!editor.isDisposed && !event.document.isInBulkUpdate) {
|
||||
popups.forEach(CodeFragmentPopup::updateCodePreview)
|
||||
updatePopupPositions()
|
||||
}
|
||||
popups.forEach(CodeFragmentPopup::updateCodePreview)
|
||||
updatePopupPositions()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user