[fleet] fix infinite hang on find in file when DesktopMacOS window manager is used

GitOrigin-RevId: 2f0fee62c1b5297d22d0be837317a68b212a9881
This commit is contained in:
pavel.sergeev
2025-05-08 21:48:55 +00:00
committed by intellij-monorepo-bot
parent 54d7330e37
commit d1f57f803b
2 changed files with 8 additions and 2 deletions
@@ -116,6 +116,7 @@ interface Editor {
val layout: EditorLayout
val composableTextRange: TextRange?
val timestamp: Long
}
interface MutableEditor : Editor {
@@ -72,7 +72,8 @@ fun simpleEditor(
xKind = EditorScrollKind.Smallest,
yKind = EditorScrollKind.Smallest,
timestamp = scrollCommandTimestamp)
else null
else null,
timestamp = 0
)
}
@@ -142,6 +143,7 @@ data class SimpleEditorState(
val focusPlace: EditorFocusPlace,
val userActionTimestamp: Map<EditorCommandType, Long> = emptyMap(),
override val composableTextRange: TextRange? = null,
override val timestamp: Long
) : Editor {
override val undoLog: UndoLog get() = document.undoLog
override val layout: EditorLayout
@@ -163,6 +165,7 @@ fun SimpleEditorState.mutate(f: MutableEditor.() -> Unit): SimpleEditorState {
SimpleMutableMultiCaret(mutableDocument, multiCaret),
oneLine,
writable,
timestamp,
editorLayoutComponent,
focusPlace,
scrollCommand,
@@ -176,7 +179,8 @@ fun SimpleEditorState.mutate(f: MutableEditor.() -> Unit): SimpleEditorState {
scrollCommand = mutableEditor.scrollCommand,
focusPlace = mutableEditor.focusPlace,
userActionTimestamp = mutableEditor.userActionTimestamp,
composableTextRange = mutableEditor.composableTextRange)
composableTextRange = mutableEditor.composableTextRange,
timestamp = documentStateAfter.timestamp + 1)
}
data class SimpleMultiCaretState(
@@ -272,6 +276,7 @@ class SimpleMutableEditor(
override val multiCaret: SimpleMutableMultiCaret,
override val oneLine: Boolean,
override val writable: Boolean,
override val timestamp: Long,
val editorLayout: SimpleEditorLayoutComponent,
var focusPlace: EditorFocusPlace,
override var scrollCommand: EditorScrollCommand?,