mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-146049 Do not reuse tab on open from recent files
This commit is contained in:
@@ -22,6 +22,7 @@ import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.impl.PresentationFactory;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.editor.markup.EffectType;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
@@ -895,7 +896,17 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
else {
|
||||
boolean oldValue = UISettings.getInstance().REUSE_NOT_MODIFIED_TABS;
|
||||
UISettings.getInstance().REUSE_NOT_MODIFIED_TABS = false;
|
||||
manager.openFile(file, true, true);
|
||||
if (oldValue) {
|
||||
CommandProcessor.getInstance().executeCommand(project, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UISettings.getInstance().REUSE_NOT_MODIFIED_TABS = true;
|
||||
}
|
||||
}, "", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user