mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[jupyter] DecoratedEditor#keepScrollingPositionWhile: change ReadAction to WriteIntendReadAction
GitOrigin-RevId: 66e9417bdb8f7ac7bf8a3396eb33c4e92fdf2038
This commit is contained in:
committed by
intellij-monorepo-bot
parent
66d01bc21b
commit
fd94eba810
@@ -7,7 +7,7 @@ import com.intellij.notebooks.visualization.inlay.JupyterBoundsChangeHandler
|
||||
import com.intellij.notebooks.visualization.ui.EditorCellViewEventListener.CellViewRemoved
|
||||
import com.intellij.notebooks.visualization.ui.EditorCellViewEventListener.EditorCellViewEvent
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.ReadAction
|
||||
import com.intellij.openapi.application.WriteIntentReadAction
|
||||
import com.intellij.openapi.client.ClientSystemInfo
|
||||
import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
@@ -262,7 +262,7 @@ class DecoratedEditor private constructor(
|
||||
}
|
||||
|
||||
internal fun <T> keepScrollingPositionWhile(editor: Editor, task: () -> T): T {
|
||||
return ReadAction.compute<T, Nothing> {
|
||||
return WriteIntentReadAction.compute<T, Nothing> {
|
||||
EditorScrollingPositionKeeper(editor).use { keeper ->
|
||||
if (editor.isDisposed) {
|
||||
return@compute task()
|
||||
|
||||
Reference in New Issue
Block a user