goto actions: vk_up/vk_down fix [^vasya]

This commit is contained in:
Sergey Ignatov
2014-05-26 13:36:57 +04:00
parent 5859ed9fb8
commit 5c120d4aee
@@ -1323,6 +1323,8 @@ public abstract class ChooseByNameBase {
}
return;
}
int position = myTextField.getCaretPosition();
int code = keyStroke.getKeyCode();
try {
super.processKeyEvent(e);
}
@@ -1331,6 +1333,11 @@ public abstract class ChooseByNameBase {
throw e1;
}
}
finally {
if (code == KeyEvent.VK_UP || code == KeyEvent.VK_DOWN) {
myTextField.setCaretPosition(position);
}
}
}
private void fillInCommonPrefix(@NotNull final String pattern) {