summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/cuchaz/enigma/gui/Gui.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/Gui.java b/src/main/java/cuchaz/enigma/gui/Gui.java
index b5238596..0ccb3f79 100644
--- a/src/main/java/cuchaz/enigma/gui/Gui.java
+++ b/src/main/java/cuchaz/enigma/gui/Gui.java
@@ -571,7 +571,14 @@ public class Gui {
571 panel.remove(panel.getComponentCount() - 1); 571 panel.remove(panel.getComponentCount() - 1);
572 panel.add(text); 572 panel.add(text);
573 text.grabFocus(); 573 text.grabFocus();
574 text.selectAll(); 574
575 int offset = text.getText().lastIndexOf('/') + 1;
576 // If it's a class and isn't in the default package, assume that it's deobfuscated.
577 if (m_reference.getNameableEntry() instanceof ClassEntry && !text.getText().startsWith(Constants.NONE_PACKAGE)
578 && offset != 0)
579 text.select(offset, text.getText().length());
580 else
581 text.selectAll();
575 582
576 redraw(); 583 redraw();
577 } 584 }