Skip to content

Commit a006261

Browse files
pavelfatinbuilduser
authored and
builduser
committed
Incremental highlighting: inReadAction, #SCL-23216
(cherry picked from commit 2c20959)
1 parent dbf6c74 commit a006261

File tree

1 file changed

+2
-1
lines changed
  • scala/scala-impl/src/org/jetbrains/plugins/scala/incremental

1 file changed

+2
-1
lines changed

scala/scala-impl/src/org/jetbrains/plugins/scala/incremental/Updater.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.intellij.openapi.editor.colors.EditorColorsScheme
1010
import com.intellij.openapi.editor.ex.{EditorEx, MarkupModelEx}
1111
import com.intellij.openapi.editor.markup.RangeHighlighter
1212
import com.intellij.openapi.util.{Key, TextRange}
13+
import org.jetbrains.plugins.scala.extensions.inReadAction
1314

1415
import java.awt.Color
1516
import javax.swing.Timer
@@ -47,7 +48,7 @@ private class Updater(editor: Editor) extends Disposable {
4748
if (!newlyVisibleRange.isEmpty) {
4849
val document = editor.getDocument
4950
val daemon = DaemonCodeAnalyzer.getInstance(editor.getProject)
50-
daemon.combineDirtyScopes(document, newlyVisibleRange)
51+
inReadAction(daemon.combineDirtyScopes(document, newlyVisibleRange))
5152
daemon.stopProcess(/* restart = */ true)
5253
}
5354

0 commit comments

Comments
 (0)