mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-06 00:32:52 +01: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() {
|
||||
deactivate(false);
|
||||
JTextField.removeKeymap(ExTextField.KEYMAP_NAME);
|
||||
}
|
||||
|
||||
private void resetCaretOffset(@NotNull Editor editor) {
|
||||
|
@ -48,6 +48,8 @@ import static java.lang.Math.min;
|
||||
*/
|
||||
public class ExTextField extends JTextField {
|
||||
|
||||
public final static String KEYMAP_NAME = "ex";
|
||||
|
||||
ExTextField() {
|
||||
// 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
|
||||
@ -112,7 +114,7 @@ public class ExTextField extends JTextField {
|
||||
}
|
||||
|
||||
setInputMap(WHEN_FOCUSED, new InputMap());
|
||||
Keymap map = addKeymap("ex", getKeymap());
|
||||
Keymap map = addKeymap(KEYMAP_NAME, getKeymap());
|
||||
loadKeymap(map, ExKeyBindings.INSTANCE.getBindings(), actions);
|
||||
map.setDefaultAction(new ExEditorKit.DefaultExKeyHandler());
|
||||
setKeymap(map);
|
||||
|
Loading…
Reference in New Issue
Block a user