Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2016-03-24 14:31:54 +0000
committerDani Megert2016-03-24 14:31:54 +0000
commite7a97411c4ccd1efe3ce2a4df29948b6b4372297 (patch)
tree41bb7beaba5cfe4f6dd1fa598f734be4512fdcb7
parentb0908b8436fb51d776b0167ca1072ac3f5a2d20b (diff)
downloadeclipse.platform.debug-e7a97411c4ccd1efe3ce2a4df29948b6b4372297.tar.gz
eclipse.platform.debug-e7a97411c4ccd1efe3ce2a4df29948b6b4372297.tar.xz
eclipse.platform.debug-e7a97411c4ccd1efe3ce2a4df29948b6b4372297.zip
Revert "Bug 473081 - Scroll locks enables on empty console"Y20160331-1000I20160405-0800I20160330-1230I20160330-0930I20160329-0800
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java23
1 files changed, 3 insertions, 20 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 a84496ad2..25728cdb0 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
@@ -232,16 +232,9 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
public void widgetSelected(SelectionEvent e) {
// scroll lock if vertical scroll bar dragged, OR selection on
// vertical bar used
- if (e.detail == SWT.TOP || e.detail == SWT.HOME) {
+ if (e.detail == SWT.TOP || e.detail == SWT.HOME || e.detail == SWT.ARROW_UP || e.detail == SWT.PAGE_UP) {
// selecting TOP or HOME should lock
setScrollLock(true);
- } else if (e.detail == SWT.ARROW_UP || e.detail == SWT.PAGE_UP) {
- // selecting TOP or HOME should lock if not end of document
- if (checkEndOfDocument()) {
- setScrollLock(false);
- } else {
- setScrollLock(true);
- }
} else if (e.detail == SWT.END || e.detail == SWT.BOTTOM) {
// selecting BOTTOM or END from vertical scroll makes it
// reveal the end
@@ -262,14 +255,8 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
@Override
public void keyPressed(KeyEvent e) {
// lock the scroll if PAGE_UP ,HOME or TOP selected
- if (e.keyCode == SWT.HOME || e.keyCode == SWT.TOP) {
+ if (e.keyCode == SWT.PAGE_UP || e.keyCode == SWT.HOME || e.keyCode == SWT.TOP || e.keyCode == SWT.ARROW_UP) {
setScrollLock(true);
- } else if (e.keyCode == SWT.PAGE_UP || e.keyCode == SWT.ARROW_UP) {
- if (checkEndOfDocument()) {
- setScrollLock(false);
- } else {
- setScrollLock(true);
- }
} else if (e.keyCode == SWT.END || e.keyCode == SWT.BOTTOM) {
setScrollLock(false);// selecting END makes it reveal the
// end
@@ -287,11 +274,7 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
setScrollLock(false);
}
} else if (!userHoldsScrollLock.get()) {
- if (checkEndOfDocument()) {
- setScrollLock(false);
- } else {
- setScrollLock(true);
- }
+ setScrollLock(true);
}
}
});

Back to the top