[editor] IJPL-233066 disable smooth caret blinking in RDP sessions

(cherry picked from commit 807ea3b9101170427d36a19d1c9fa1b7b9c3b79e)

IJ-CR-192627

GitOrigin-RevId: f85872c18b956f3c50e545e7089203ea5deaed76
This commit is contained in:
Stanislav Alekseev
2026-02-26 13:27:04 +00:00
committed by intellij-monorepo-bot
parent 6ee12975e6
commit 53e532e52b
2 changed files with 13 additions and 6 deletions
@@ -73,11 +73,14 @@ internal class EditorCaretRepaintService(coroutineScope: CoroutineScope) {
check(actionRequests.tryEmit(Unit))
}
private fun shouldUseNormalBlinking(editor: EditorImpl) =
editor.shouldDisableAnimations() || !editor.settings.isSmoothCaretBlinking
private suspend fun blink(editor: EditorImpl) {
if (editor.settings.isSmoothCaretBlinking) {
blinkSmooth(editor)
} else {
if (shouldUseNormalBlinking(editor)) {
blinkNormal(editor)
} else {
blinkSmooth(editor)
}
}
@@ -3355,13 +3355,17 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
}
}
boolean shouldDisableAnimations() {
return Registry.is("ui.simplified", false) ||
PowerSaveMode.isEnabled() ||
RemoteDesktopService.isRemoteSession();
}
private boolean shouldSetCursorPositionImmediately() {
return !getSettings().isAnimatedCaret() ||
gainedFocus.getAndSet(false) ||
myMouseIsInDrag ||
Registry.is("ui.simplified", false) ||
PowerSaveMode.isEnabled() ||
RemoteDesktopService.isRemoteSession();
shouldDisableAnimations();
}
private void setCursorPosition() {