Bug 4360 Template - cursor at wrong position
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
private EditBox getEditBox(TypedEvent e) {
		int index= findEditBoxIndex(e);		
		return fEditBoxes[index];
	}
	public void modifyText(ModifyEvent e) {
		EditBox box= getEditBox(e);		
		String modifiedText= box.getText().getText();
		int rangeIndex= box.getRangeIndex();		
		
		fModel.setText(rangeIndex, box.getText().getText());
		
		for (int i= 0; i != fEditBoxes.length; i++) {
			if (fModel.shareSameModel(fEditBoxes[i].getRangeIndex(), rangeIndex)) {
				
				if (box.equals(fEditBoxes[i])) {
					
					StyledText text= fEditBoxes[i].getText();
					int offset= text.getCaretOffset();
					Point selection= text.getSelection();			
					text.removeModifyListener(this);
					text.setText(modifiedText);
					
					text.addModifyListener(this);
					text.setCaretOffset(offset);
					text.setSelection(selection);
				
				} else {
					fEditBoxes[i].getText().setText(modifiedText);
				}			
			}