mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-18 18:34:04 +02:00
[VIM-1628] Do not handle undefined characters
This commit is contained in:
parent
900f415c6b
commit
c202394c3c
@ -22,14 +22,15 @@ import com.intellij.codeInsight.lookup.Lookup;
|
|||||||
import com.intellij.codeInsight.lookup.LookupManager;
|
import com.intellij.codeInsight.lookup.LookupManager;
|
||||||
import com.intellij.openapi.actionSystem.DataContext;
|
import com.intellij.openapi.actionSystem.DataContext;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
|
||||||
import com.intellij.openapi.editor.Editor;
|
import com.intellij.openapi.editor.Editor;
|
||||||
|
import com.intellij.openapi.editor.actionSystem.ActionPlan;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandlerEx;
|
import com.intellij.openapi.editor.actionSystem.TypedActionHandlerEx;
|
||||||
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
import com.maddyhome.idea.vim.helper.EditorDataContext;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accepts all regular keystrokes and passes them on to the Vim key handler.
|
* Accepts all regular keystrokes and passes them on to the Vim key handler.
|
||||||
@ -63,7 +64,7 @@ public class VimTypedActionHandler implements TypedActionHandlerEx {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(@NotNull final Editor editor, final char charTyped, @NotNull final DataContext context) {
|
public void execute(@NotNull final Editor editor, final char charTyped, @NotNull final DataContext context) {
|
||||||
if (isEnabled(editor)) {
|
if (isEnabled(editor) && charTyped != KeyEvent.CHAR_UNDEFINED) {
|
||||||
try {
|
try {
|
||||||
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), new EditorDataContext(editor));
|
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), new EditorDataContext(editor));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user