Index: trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java	(revision 738)
+++ trunk/src/org/openstreetmap/josm/tools/AutoCompleteComboBox.java	(revision 739)
@@ -39,4 +39,5 @@
 			if(selecting || (offs == 0 && str.equals(getText(0, getLength()))))
 				return;
+			boolean initial = (offs == 0 && getLength() == 0);
 			super.insertString(offs, str, a);
 
@@ -48,7 +49,12 @@
 
 			int size = getLength();
+			int start = offs+str.length();
+			int end = start;
 			String curText = getText(0, size);
 			// lookup and select a matching item
 			Object item = lookupItem(curText);
+			setSelectedItem(item);
+			if(initial)
+				start = 0;
 			if (item != null) {
 				String newText = item.toString();
@@ -59,10 +65,11 @@
 					super.insertString(0, newText, a);
 					selecting = false;
-					JTextComponent editor = (JTextComponent)comboBox.getEditor().getEditorComponent();
-					editor.setSelectionStart(size);
-					editor.setSelectionEnd(getLength());
+					start = size;
+					end = getLength();
 				}
 			}
-			setSelectedItem(item);
+			JTextComponent editor = (JTextComponent)comboBox.getEditor().getEditorComponent();
+			editor.setSelectionStart(start);
+			editor.setSelectionEnd(end);
 		}
 
@@ -95,5 +102,4 @@
 		for (String elem : elems) model.addElement(elem);
 		this.getEditor().setItem(oldValue);
-		this.getEditor().selectAll();
 	}
 }
