mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-02-25 20:46:00 +01:00
VIM-1205 Don't move key handling into separate event for raw handlers
This commit is contained in:
parent
563092cffb
commit
72fbe758b4
@ -19,6 +19,11 @@ usual beta standards.
|
||||
To Be Released
|
||||
--------------
|
||||
|
||||
A bugfix release.
|
||||
|
||||
* VIM-1205 Don't move key handling into separate event for raw handlers
|
||||
|
||||
|
||||
0.47, 2016-10-19
|
||||
----------------
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
<name>IdeaVim</name>
|
||||
<id>IdeaVIM</id>
|
||||
<change-notes><![CDATA[
|
||||
<p>To be released:</p>
|
||||
<ul>
|
||||
<li>Possible fix for keyboard input lag since 0.47</li>
|
||||
</ul>
|
||||
<p>0.47:</p>
|
||||
<ul>
|
||||
<li>Various bug fixes</li>
|
||||
|
@ -21,7 +21,6 @@ package com.maddyhome.idea.vim;
|
||||
import com.intellij.codeInsight.lookup.Lookup;
|
||||
import com.intellij.codeInsight.lookup.LookupManager;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
|
||||
@ -50,18 +49,12 @@ public class VimTypedActionHandler implements TypedActionHandler {
|
||||
@Override
|
||||
public void execute(@NotNull final Editor editor, final char charTyped, @NotNull final DataContext context) {
|
||||
if (isEnabled(editor)) {
|
||||
// Run key handler outside of the key typed command for creating our own undoable commands
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), new EditorDataContext(editor));
|
||||
}
|
||||
catch (Throwable e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
handler.handleKey(editor, KeyStroke.getKeyStroke(charTyped), new EditorDataContext(editor));
|
||||
}
|
||||
catch (Throwable e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
else {
|
||||
origHandler.execute(editor, charTyped, context);
|
||||
|
@ -24,7 +24,6 @@ import com.intellij.notification.Notification;
|
||||
import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.keymap.KeymapUtil;
|
||||
@ -99,18 +98,12 @@ public class VimShortcutKeyAction extends AnAction implements DumbAware {
|
||||
notifyAboutShortcutConflict(keyStroke);
|
||||
}
|
||||
// Should we use InjectedLanguageUtil.getTopLevelEditor(editor) here, as we did in former EditorKeyHandler?
|
||||
// Run key handler later to restore input events sequence due to VimTypedActionHandler
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, new EditorDataContext(editor));
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
ourLogger.error(throwable);
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
KeyHandler.getInstance().handleKey(editor, keyStroke, new EditorDataContext(editor));
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
ourLogger.error(throwable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user