Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2017-11-14 22:58:21 +0000
committerJonah Graham2017-11-14 23:04:40 +0000
commitc9c292982dba022f3e481a9630c398e81db87d78 (patch)
treef9246a0914efd4a296f8cbab6d60ad72b00d7e76
parentd4bfa4ac43f6a9e09e682affda008a7cede55110 (diff)
downloadorg.eclipse.cdt-c9c292982dba022f3e481a9630c398e81db87d78.tar.gz
org.eclipse.cdt-c9c292982dba022f3e481a9630c398e81db87d78.tar.xz
org.eclipse.cdt-c9c292982dba022f3e481a9630c398e81db87d78.zip
Bug 519533: Fix scroll lock on build console
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
index 57ba6e1321a..8726c5cc496 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
@@ -266,7 +266,9 @@ public class BuildConsolePartitioner
// to avoid document becoming 0 length and therefore the
// listeners assume the document has been cleared
fDocument.replace(length + toTrim, 0, appendContents);
- fDocument.replace(0, toTrim, ""); //$NON-NLS-1$
+ if (toTrim > 0) {
+ fDocument.replace(0, toTrim, ""); //$NON-NLS-1$
+ }
} catch (BadLocationException e) {
fDocument.set(update.getNewContents());
}

Back to the top