Index: tagging/ac/AutoCompletingComboBox.java
===================================================================
--- tagging/ac/AutoCompletingComboBox.java	(revision 3823)
+++ tagging/ac/AutoCompletingComboBox.java	(working copy)
@@ -84,9 +84,16 @@
                 }
             }
 
+            // the string being inserted might be a "full" string from the list
+            // of valid completions (instanceof AutoCompletionListItem), or a
+            // "partial" string being typed (instanceof String).
+            Object item = comboBox.getSelectedItem();
+            if (item != null && (item instanceof String || !curText.equals(((AutoCompletionListItem) item).getValue()))) {
+                // only in the latter case do we have to
             // lookup and select a matching item
-            Object item = lookupItem(curText);
+                item = lookupItem(curText);
             setSelectedItem(item);
+            }
             if (initial) {
                 start = 0;
             }
@@ -113,7 +120,7 @@
             selecting = false;
         }
 
-        private Object lookupItem(String pattern) {
+        private AutoCompletionListItem lookupItem(String pattern) {
             ComboBoxModel model = comboBox.getModel();
             AutoCompletionListItem bestItem = null;
             for (int i = 0, n = model.getSize(); i < n; i++) {
