多编辑器运行日志输出bug

This commit is contained in:
Van 2014-08-19 18:05:56 +08:00
parent aff54214ff
commit 22f96fa460
2 changed files with 13 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import (
)
func main() {
fmt.Println("Hello, 世界")
fmt.Println("Hello, 世界1")
time.Sleep(time.Second)
}

View File

@ -63,9 +63,16 @@ var editors = {
var node = tree.fileTree.getNodeByTId(id);
tree.fileTree.selectNode(node);
wide.curNode = node;
for (var i = 0, ii = editors.data.length; i < ii; i++) {
if (editors.data[i].id === id) {
wide.curEditor = editors.data[i].editor;
break;
}
}
});
},
_selectTab: function(id) {
_selectTab: function(id, editor) {
var $tabsPanel = $(".edit-panel .tabs-panel"),
$tabs = $(".edit-panel .tabs");
@ -79,12 +86,13 @@ var editors = {
$tabs.children("span[data-id='" + id + "']").addClass("current");
$("#editor" + id).parent().show();
wide.curEditor = editor;
},
newEditor: function(data) {
var id = wide.curNode.tId;
for (var i = 0, ii = editors.data.length; i < ii; i++) {
if (editors.data[i].id === id) {
editors._selectTab(id);
editors._selectTab(id, editors.data[i].editor);
return false;
}
}