Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 4094)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 4095)
@@ -22,5 +22,4 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
 import org.openstreetmap.josm.gui.util.TableCellEditorSupport;
 
@@ -98,8 +97,7 @@
                 super.insertString(0,matchingString,a);
 
-                // highlight from end to insert position
-                //
-                setCaretPosition(getLength());
-                moveCaretPosition(offs + str.length());
+                // highlight from insert position to end position to put the caret at the end
+                setCaretPosition(offs + str.length());
+                moveCaretPosition(getLength());
             } else {
                 // there are no matches. Insert the new text, do not highlight
