This commit is contained in:
parent
c90bdfe0e8
commit
7aa7f84d1a
|
@ -401,20 +401,18 @@ var wide = {
|
|||
}
|
||||
|
||||
switch (data.cmd) {
|
||||
case 'run': // 正在运行
|
||||
|
||||
if(!wide.curProcessId){
|
||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
||||
}else{
|
||||
case 'run':
|
||||
if (!wide.curProcessId) { // output first time
|
||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
||||
} else { // the following outputs
|
||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html().replace(/<\/pre>$/g, data.output + '</pre>'));
|
||||
}
|
||||
|
||||
|
||||
wide.curProcessId = data.pid;
|
||||
|
||||
break;
|
||||
case 'run-done': // 运行结束
|
||||
case 'run-done':
|
||||
wide.curProcessId = undefined;
|
||||
// 运行结束后修改 [构建&运行] 图标状态为可用状态
|
||||
$(".toolbars .ico-stop").removeClass("ico-stop")
|
||||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||
|
||||
|
@ -435,7 +433,7 @@ var wide = {
|
|||
case 'build':
|
||||
bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + '<pre>' + data.output + '</pre>');
|
||||
|
||||
if (data.lints) { // 说明编译有错误输出
|
||||
if (data.lints) { // has build error
|
||||
for (var i = 0; i < data.lints.length; i++) {
|
||||
var lint = data.lints[i];
|
||||
|
||||
|
@ -448,7 +446,7 @@ var wide = {
|
|||
.addClass("ico-buildrun").attr("title", config.label.build_n_run);
|
||||
}
|
||||
|
||||
// 触发一次 gutter lint
|
||||
// trigger gutter lint
|
||||
CodeMirror.signal(wide.curEditor, "change", wide.curEditor);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue