This commit is contained in:
Liang Ding 2014-11-02 10:58:13 +08:00
parent b7634fa4a5
commit 91a8fdf871
3 changed files with 13 additions and 16 deletions

View File

@ -20,7 +20,7 @@
"Locale": "en_US", "Locale": "en_US",
"GoFormat": "gofmt", "GoFormat": "gofmt",
"FontFamily": "Helvetica", "FontFamily": "Helvetica",
"FontSize": "inherit", "FontSize": "13px",
"Editor": { "Editor": {
"FontFamily": "Consolas, 'Courier New', monospace", "FontFamily": "Consolas, 'Courier New', monospace",
"FontSize": "inherit" "FontSize": "inherit"

View File

@ -714,17 +714,14 @@ var wide = {
switch (mode) { switch (mode) {
case "text/x-go": case "text/x-go":
$.ajax({ $.ajax({
async: false, // 同步执行
type: 'POST', type: 'POST',
url: '/go/fmt', url: '/go/fmt',
data: JSON.stringify(request), data: JSON.stringify(request),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.succ) { if (data.succ) {
curEditor.setValue(data.code); formatted = data.code;
curEditor.setCursor(cursor);
curEditor.scrollTo(null, scrollInfo.top);
return;
} }
} }
}); });
@ -750,7 +747,6 @@ var wide = {
curEditor.scrollTo(null, scrollInfo.top); curEditor.scrollTo(null, scrollInfo.top);
wide._save(); wide._save();
}
// 清除未保存状态 // 清除未保存状态
curEditor.doc.markClean(); curEditor.doc.markClean();
@ -760,6 +756,7 @@ var wide = {
$span.removeClass("changed"); $span.removeClass("changed");
} }
}); });
}
}, },
openAbout: function () { openAbout: function () {
$("#dialogAbout").dialog("open"); $("#dialogAbout").dialog("open");

View File

@ -2,7 +2,7 @@ body,
input, input,
button { button {
font-family: Helvetica; font-family: Helvetica;
font-size: inherit; font-size: 13px;
} }
.edit-exprinfo, .edit-exprinfo,