Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2015-09-11 05:46:09 -0400
committerSarika Sinha2015-09-11 05:46:09 -0400
commit2ff2e7a814522289fa9cac7558a18cda68ce830f (patch)
tree1633a3f283439c33e823af2e4ad7531b0af8d2d9 /org.eclipse.ui.console
parentae3934bcd4d225126bb515b87fd741b28879db6e (diff)
downloadeclipse.platform.debug-2ff2e7a814522289fa9cac7558a18cda68ce830f.tar.gz
eclipse.platform.debug-2ff2e7a814522289fa9cac7558a18cda68ce830f.tar.xz
eclipse.platform.debug-2ff2e7a814522289fa9cac7558a18cda68ce830f.zip
(TextLayout.java:2005) Change-Id: Ia48894a97b73ab44fc75dcb604b5cdaa9c9bd4c9
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java2
1 files changed, 1 insertions, 1 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 51b8ba4a0..60a92be6f 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
@@ -142,7 +142,7 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
StyledText textWidget = getTextWidget();
if (textWidget != null && !textWidget.isDisposed()) {
int lineCount = textWidget.getLineCount();
- textWidget.setTopIndex(lineCount - 1);
+ textWidget.setTopIndex(lineCount > 0 ? lineCount - 1 : 0);
}
}

Back to the top