Changeset 8268 in josm
- Timestamp:
- 2015-04-25T20:57:20+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r7864 r8268 65 65 @Override 66 66 public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { 67 // TODO get rid of code duplication w.r.t. AutoCompletingTextField.AutoCompletionDocument.insertString 68 67 69 if (selecting || (offs == 0 && str.equals(getText(0, getLength())))) 68 70 return; … … 82 84 if (a != null && a.isDefined(StyleConstants.ComposedTextAttribute)) 83 85 return; 86 87 // if the current offset isn't at the end of the document we don't autocomplete. 88 // If a highlighted autocompleted suffix was present and we get here Swing has 89 // already removed it from the document. getLength() therefore doesn't include the 90 // autocompleted suffix. 91 if (offs + str.length() < getLength()) { 92 return; 93 } 84 94 85 95 int size = getLength();
Note:
See TracChangeset
for help on using the changeset viewer.