Add storing second session back again
This commit is contained in:
parent
3f78f87f6e
commit
cb6a93a8ce
1 changed files with 5 additions and 1 deletions
|
|
@ -365,9 +365,13 @@ exports.launch = function(env) {
|
|||
env.editor.getSession().setUseSoftTabs(checked);
|
||||
});
|
||||
|
||||
var secondSession = null;
|
||||
bindDropdown("split", function(value) {
|
||||
var sp = env.split;
|
||||
if (value == "none") {
|
||||
if (sp.getSplits() == 2) {
|
||||
secondSession = sp.getEditor(1).session;
|
||||
}
|
||||
sp.setSplits(1);
|
||||
} else {
|
||||
var newEditor = (sp.getSplits() == 1);
|
||||
|
|
@ -379,7 +383,7 @@ exports.launch = function(env) {
|
|||
sp.setSplits(2);
|
||||
|
||||
if (newEditor) {
|
||||
var session = sp.getEditor(0).session;
|
||||
var session = secondSession || sp.getEditor(0).session;
|
||||
var newSession = sp.setSession(session, 1);
|
||||
newSession.name = session.name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue