Bug 72167 - ProcessConsole should extend IOConsole
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
index 71cb47d..f929bcd 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
@@ -371,10 +371,7 @@
         synchronized(patterns) {
             for (Iterator iter = patterns.iterator(); iter.hasNext();) {
                 CompiledPatternMatchListener pattern = (CompiledPatternMatchListener) iter.next();
-                int start = pattern.end;
-                if (event.fLength > 0) {
-                	start = Math.min(pattern.end, event.fOffset);
-                }
+                int start = Math.min(pattern.end, event.fOffset);
                 try {
                     testForMatch(pattern, start);
                 } catch (BadLocationException e) {
@@ -389,10 +386,10 @@
         Matcher matcher = compiled.pattern.matcher(contents);
         IPatternMatchListener notifier = compiled.listener;
         while(matcher.find()) {
-        	String group = matcher.group();
-        	int matchOffset = documentOffset + matcher.start();
-        	notifier.matchFound(new PatternMatchEvent(this, matchOffset, group.length()));
-        	compiled.end = matcher.end() + documentOffset + 1;
+            String group = matcher.group();
+            int matchOffset = documentOffset + matcher.start();
+            notifier.matchFound(new PatternMatchEvent(this, matchOffset, group.length()));
+            compiled.end = matcher.end() + documentOffset;
         }
     }