自动补全为 fun 时,添加 ()

This commit is contained in:
Van 2014-12-04 15:15:15 +08:00
parent 78accaa82e
commit c0bbfffc16
1 changed files with 4 additions and 5 deletions

View File

@ -339,7 +339,8 @@ var editors = {
if (autocompleteArray) {
for (var i = 0; i < autocompleteArray.length; i++) {
var displayText = '';
var displayText = '',
text = autocompleteArray[i].name;
switch (autocompleteArray[i].class) {
case "type":
@ -349,23 +350,21 @@ var editors = {
displayText = '<span class="fn-clear">'// + autocompleteArray[i].class
+ '<b class="fn-left">' + autocompleteArray[i].name + '</b> '
+ autocompleteArray[i].type + '</span>';
break;
case "func":
displayText = '<span>'// + autocompleteArray[i].class
+ '<b>' + autocompleteArray[i].name + '</b>'
+ autocompleteArray[i].type.substring(4) + '</span>';
text += '()';
break;
default:
console.warn("Can't handle autocomplete [" + autocompleteArray[i].class + "]");
break;
}
autocompleteHints[i] = {
displayText: displayText,
text: autocompleteArray[i].name
text: text
};
}
}