Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2015-04-15 07:48:01 -0400
committerSarika Sinha2015-04-15 07:48:01 -0400
commit3c608ddde09bcae80783e2d93917117c0a7117c3 (patch)
tree45cd5505af9d99cae531cbfe16af01f2a954bc92 /org.eclipse.ui.console
parenta5cd12c947a8b95276313f78e5eef3ebe59d7d5a (diff)
downloadeclipse.platform.debug-3c608ddde09bcae80783e2d93917117c0a7117c3.tar.gz
eclipse.platform.debug-3c608ddde09bcae80783e2d93917117c0a7117c3.tar.xz
eclipse.platform.debug-3c608ddde09bcae80783e2d93917117c0a7117c3.zip
Bug 457969 - [console] Automatic scroll lock should unlock when user
enters characters Change-Id: Ie48a335b09929351bd7b8b62434f92d6c23859a1
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
index 504f0ce0a..ca9581d3c 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
@@ -31,6 +31,8 @@ import org.eclipse.swt.events.MouseTrackListener;
import org.eclipse.swt.events.MouseWheelListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.Font;
@@ -278,6 +280,16 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
}
});
+ styledText.addVerifyListener(new VerifyListener() {
+ @Override
+ public void verifyText(VerifyEvent e) {
+ // unlock the auto lock if user starts typing only if it was not manual lock
+ if (scrollLockStateProvider != null && !scrollLockStateProvider.getScrollLock()) {
+ setScrollLock(false);
+ }
+ }
+ });
+
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
propertyChangeListener = new HyperlinkColorChangeListener();
colorRegistry.addListener(propertyChangeListener);

Back to the top