mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-06-05 04:34:04 +02:00
Clear keymap on reset
This commit is contained in:
parent
626871e34d
commit
ca8d05ff13
src/com/maddyhome/idea/vim/ui
@ -228,6 +228,7 @@ public class ExEntryPanel extends JPanel {
|
|||||||
|
|
||||||
private void reset() {
|
private void reset() {
|
||||||
deactivate(false);
|
deactivate(false);
|
||||||
|
JTextField.removeKeymap(ExTextField.KEYMAP_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetCaretOffset(@NotNull Editor editor) {
|
private void resetCaretOffset(@NotNull Editor editor) {
|
||||||
|
@ -48,6 +48,8 @@ import static java.lang.Math.min;
|
|||||||
*/
|
*/
|
||||||
public class ExTextField extends JTextField {
|
public class ExTextField extends JTextField {
|
||||||
|
|
||||||
|
public final static String KEYMAP_NAME = "ex";
|
||||||
|
|
||||||
ExTextField() {
|
ExTextField() {
|
||||||
// We need to store this in a field, because we can't trust getCaret(), as it will return an instance of
|
// We need to store this in a field, because we can't trust getCaret(), as it will return an instance of
|
||||||
// ComposedTextCaret when working with dead keys or input methods
|
// ComposedTextCaret when working with dead keys or input methods
|
||||||
@ -112,7 +114,7 @@ public class ExTextField extends JTextField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setInputMap(WHEN_FOCUSED, new InputMap());
|
setInputMap(WHEN_FOCUSED, new InputMap());
|
||||||
Keymap map = addKeymap("ex", getKeymap());
|
Keymap map = addKeymap(KEYMAP_NAME, getKeymap());
|
||||||
loadKeymap(map, ExKeyBindings.INSTANCE.getBindings(), actions);
|
loadKeymap(map, ExKeyBindings.INSTANCE.getBindings(), actions);
|
||||||
map.setDefaultAction(new ExEditorKit.DefaultExKeyHandler());
|
map.setDefaultAction(new ExEditorKit.DefaultExKeyHandler());
|
||||||
setKeymap(map);
|
setKeymap(map);
|
||||||
|
Loading…
Reference in New Issue
Block a user