diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/ExclusivePositionUpdater.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/ExclusivePositionUpdater.java index 9a079c9644c..758f6eb3f6d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/ExclusivePositionUpdater.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/ExclusivePositionUpdater.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -77,7 +77,7 @@ final class ExclusivePositionUpdater implements IPositionUpdater { // offset becomes end of event, length adjusted accordingly int newOffset= eventOffset + eventNewLength; position.setOffset(newOffset); - position.setLength(end - newOffset); + position.setLength(end - newOffset + deltaLength); } else { // event consumes the position - delete it position.delete();