Jump to the found text after pcode search fixed

This commit is contained in:
2016-12-25 14:22:01 +01:00
parent 9ecb2e4a81
commit bf59e9e5fb
5 changed files with 189 additions and 133 deletions
@@ -314,7 +314,6 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan
//No standard AddKeyListener as we want to catch Ctrl globally no matter of focus
KeyboardFocusManager.getCurrentKeyboardFocusManager()
.addKeyEventPostProcessor(new KeyEventPostProcessor() {
@Override
public boolean postProcessKeyEvent(KeyEvent e) {
if (e.getID() == KeyEvent.KEY_PRESSED) {
@@ -478,6 +477,7 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan
if (Configuration._debugMode.get() && t != null && t.length() > truncateLimit) {
t = t.substring(0, truncateLimit) + "\r\n" + AppStrings.translate("editorTruncateWarning").replace("%chars%", Integer.toString(truncateLimit));
}
super.setText(t);
setCaretPosition(0); //scroll to top
}