1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-03-01 04:46:02 +01:00

VimEditor update

This commit is contained in:
Alex Plate 2022-01-27 17:33:56 +03:00
parent c5a504bde3
commit 775bde62c8
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
2 changed files with 4 additions and 3 deletions
src/main/java/com/maddyhome/idea/vim

View File

@ -307,7 +307,7 @@ public class KeyHandler {
shouldRecord &= VimPlugin.getChange().processKeyInSelectMode(editor.getEditor(), context, key);
} else if (editorState.getMappingState().getMappingMode() == MappingMode.CMD_LINE) {
LOG.trace("Process cmd line");
shouldRecord &= VimPlugin.getProcess().processExKey(editor.getEditor(), key);
shouldRecord &= VimPlugin.getProcess().processExKey(editor, key);
}
// If we get here then the user has entered an unrecognized series of keystrokes
else {

View File

@ -41,6 +41,7 @@ import com.maddyhome.idea.vim.ex.ExException;
import com.maddyhome.idea.vim.ex.InvalidCommandException;
import com.maddyhome.idea.vim.helper.UiHelper;
import com.maddyhome.idea.vim.newapi.IjVimEditor;
import com.maddyhome.idea.vim.newapi.VimEditor;
import com.maddyhome.idea.vim.ui.ex.ExEntryPanel;
import com.maddyhome.idea.vim.vimscript.Executor;
import com.maddyhome.idea.vim.vimscript.model.CommandLineVimLContext;
@ -90,7 +91,7 @@ public class ProcessGroup {
panel.activate(editor, context, ":", initText, 1);
}
public boolean processExKey(Editor editor, @NotNull KeyStroke stroke) {
public boolean processExKey(@NotNull VimEditor editor, @NotNull KeyStroke stroke) {
// This will only get called if somehow the key focus ended up in the editor while the ex entry window
// is open. So I'll put focus back in the editor and process the key.
@ -103,7 +104,7 @@ public class ProcessGroup {
}
else {
CommandState.getInstance(editor).popModes();
KeyHandler.getInstance().reset(new IjVimEditor(editor));
KeyHandler.getInstance().reset(editor);
return false;
}
}