tweaking and minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-05-09 04:59:36 +03:00
parent 77f830d5ee
commit f281b3d09d

View File

@ -399,6 +399,7 @@ var WorkspaceActions = actions.Actions({
function(){ return Object.keys(this.config['workspaces']) }, function(){ return Object.keys(this.config['workspaces']) },
function(state){ this.loadWorkspace(state) })], function(state){ this.loadWorkspace(state) })],
// XXX should we keep the stack unique???
pushWorkspace: ['- Workspace/', pushWorkspace: ['- Workspace/',
function(name){ function(name){
name = name || this.workspace name = name || this.workspace
@ -406,6 +407,10 @@ var WorkspaceActions = actions.Actions({
this.saveWorkspace() this.saveWorkspace()
if(stack.slice(-1)[0] == name){
return
}
this.workspace != name && this.loadWorkspace(name) this.workspace != name && this.loadWorkspace(name)
stack.push(name) stack.push(name)
}], }],