Ticket #6256: patch_Ticket_6256 .txt

File patch_Ticket_6256 .txt, 1.2 KB (added by Hojoe, 15 years ago)

now the AutoCompletingTextField works like the AutoCompletingComboBox for the tag editor

Line 
1### Eclipse Workspace Patch 1.0
2#P JOSM
3Index: src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
4===================================================================
5--- src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java (revision 4088)
6+++ src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java (working copy)
7@@ -21,7 +21,6 @@
8 import javax.swing.text.StyleConstants;
9
10 import org.openstreetmap.josm.Main;
11-import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
12 import org.openstreetmap.josm.gui.util.TableCellEditorSupport;
13
14 /**
15@@ -97,10 +96,9 @@
16 remove(0,getLength());
17 super.insertString(0,matchingString,a);
18
19- // highlight from end to insert position
20- //
21- setCaretPosition(getLength());
22- moveCaretPosition(offs + str.length());
23+ // highlight from insert position to end position to put the caret at the end
24+ setCaretPosition(offs + str.length());
25+ moveCaretPosition(getLength());
26 } else {
27 // there are no matches. Insert the new text, do not highlight
28 //