IDEA-108057 Caret position is messed up on navigation if editor tabs are off

Forcing to store editor settings on closing a file at 'no tabs' mode
This commit is contained in:
Denis.Zhdanov
2013-05-31 12:23:08 +04:00
parent 54e445e5e6
commit dde486118c
2 changed files with 7 additions and 3 deletions
@@ -156,7 +156,7 @@ public final class EditorHistoryManager extends AbstractProjectComponent impleme
}
}
private void updateHistoryEntry(@Nullable final VirtualFile file, final boolean changeEntryOrderOnly) {
public void updateHistoryEntry(@Nullable final VirtualFile file, final boolean changeEntryOrderOnly) {
updateHistoryEntry(file, null, null, changeEntryOrderOnly);
}
@@ -23,7 +23,10 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.EditorFactory;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.event.*;
import com.intellij.openapi.editor.event.DocumentAdapter;
import com.intellij.openapi.editor.event.DocumentEvent;
import com.intellij.openapi.editor.event.EditorMouseEvent;
import com.intellij.openapi.editor.event.EditorMouseEventArea;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.openapi.editor.ex.EditorMarkupModel;
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
@@ -32,6 +35,7 @@ import com.intellij.openapi.editor.impl.EditorImpl;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.impl.EditorHistoryManager;
import com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl;
import com.intellij.openapi.fileTypes.FileTypeEvent;
import com.intellij.openapi.fileTypes.FileTypeListener;
@@ -120,7 +124,7 @@ class TextEditorComponent extends JBLoadingPanel implements DataProvider{
*/
void dispose(){
myDocument.removeDocumentListener(myDocumentListener);
EditorHistoryManager.getInstance(myProject).updateHistoryEntry(myFile, false);
disposeEditor(myEditor);
myConnection.disconnect();