mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-10 06:40:37 +02:00
Remove redundant code
This commit is contained in:
parent
6a2de17f12
commit
c6948dbb1c
src/com/maddyhome/idea/vim
@ -173,15 +173,10 @@ public class VimPlugin implements ApplicationComponent, JDOMExternalizable//, Co
|
||||
// we need to force the generation of the key map when the first project is opened.
|
||||
ProjectManager.getInstance().addProjectManagerListener(new ProjectManagerAdapter() {
|
||||
public void projectOpened(Project project) {
|
||||
FileEditorManagerListener l = new ChangeGroup.InsertCheck();
|
||||
listeners.add(l);
|
||||
l = new MotionGroup.MotionEditorChange();
|
||||
listeners.add(l);
|
||||
l = new FileGroup.SelectionCheck();
|
||||
listeners.add(l);
|
||||
listeners.add(new MotionGroup.MotionEditorChange());
|
||||
listeners.add(new FileGroup.SelectionCheck());
|
||||
if (ApiHelper.supportsColorSchemes()) {
|
||||
l = new SearchGroup.EditorSelectionCheck();
|
||||
listeners.add(l);
|
||||
listeners.add(new SearchGroup.EditorSelectionCheck());
|
||||
}
|
||||
|
||||
for (FileEditorManagerListener listener : listeners) {
|
||||
|
@ -31,9 +31,6 @@ import com.intellij.openapi.editor.event.EditorFactoryEvent;
|
||||
import com.intellij.openapi.editor.event.EditorMouseAdapter;
|
||||
import com.intellij.openapi.editor.event.EditorMouseEvent;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerAdapter;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerEvent;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@ -1600,50 +1597,6 @@ public class ChangeGroup extends AbstractActionGroup {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class listens for editor tab changes so any insert/replace modes that need to be reset can be
|
||||
*/
|
||||
public static class InsertCheck extends FileEditorManagerAdapter {
|
||||
/**
|
||||
* Ensure that all open editors get a block cursor for command mode.
|
||||
*
|
||||
* @param fileEditorManager
|
||||
* @param virtualFile
|
||||
*/
|
||||
public void fileOpened(FileEditorManager fileEditorManager, VirtualFile virtualFile) {
|
||||
if (!VimPlugin.isEnabled()) return;
|
||||
|
||||
resetCursor(virtualFile, EditorData.getProject(fileEditorManager), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* The user has changed the editor they are working with - exit insert/replace mode, and complete any
|
||||
* appropriate repeat.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
public void selectionChanged(FileEditorManagerEvent event) {
|
||||
if (!VimPlugin.isEnabled()) return;
|
||||
/* TODO[oleg] don't we break anything with this persistense editor states?
|
||||
logger.debug("selected file changed");
|
||||
|
||||
FileEditor fe = event.getOldEditor();
|
||||
if (fe instanceof TextEditor) {
|
||||
Editor editor = ((TextEditor)event.getOldEditor()).getEditor();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("reset state for " + editor);
|
||||
}
|
||||
KeyHandler.getInstance().fullReset(editor);
|
||||
}
|
||||
|
||||
VirtualFile virtualFile = event.getOldFile();
|
||||
if (virtualFile != null) {
|
||||
resetCursor(virtualFile, EditorData.getProject(event.getManager()), false);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayList strokes = new ArrayList();
|
||||
private ArrayList lastStrokes;
|
||||
private int insertStart;
|
||||
|
Loading…
Reference in New Issue
Block a user