mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CWM: Do not perform autoscroll if editor was changed by remote client, fix CWM-280
GitOrigin-RevId: eec2448bdf51cacd21738843e514121d38765bac
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2f27fb90c6
commit
b030aa407f
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.codeWithMe.ClientId;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
@@ -71,6 +72,9 @@ public abstract class AutoScrollFromSourceHandler {
|
||||
}
|
||||
|
||||
private void selectInAlarm(final FileEditor editor) {
|
||||
// Code WithMe: do not process changes from remote (client) editor switching
|
||||
if (!ClientId.isCurrentlyUnderLocalId()) return;
|
||||
|
||||
if (editor != null && myComponent.isShowing() && isAutoScrollEnabled()) {
|
||||
myAlarm.cancelAllRequests();
|
||||
myAlarm.addRequest(() -> selectElementFromEditor(editor), getAlarmDelay(), getModalityState());
|
||||
|
||||
Reference in New Issue
Block a user