自动补全为 fun 时,添加 ()
This commit is contained in:
parent
78accaa82e
commit
c0bbfffc16
|
@ -339,7 +339,8 @@ var editors = {
|
||||||
|
|
||||||
if (autocompleteArray) {
|
if (autocompleteArray) {
|
||||||
for (var i = 0; i < autocompleteArray.length; i++) {
|
for (var i = 0; i < autocompleteArray.length; i++) {
|
||||||
var displayText = '';
|
var displayText = '',
|
||||||
|
text = autocompleteArray[i].name;
|
||||||
|
|
||||||
switch (autocompleteArray[i].class) {
|
switch (autocompleteArray[i].class) {
|
||||||
case "type":
|
case "type":
|
||||||
|
@ -349,23 +350,21 @@ var editors = {
|
||||||
displayText = '<span class="fn-clear">'// + autocompleteArray[i].class
|
displayText = '<span class="fn-clear">'// + autocompleteArray[i].class
|
||||||
+ '<b class="fn-left">' + autocompleteArray[i].name + '</b> '
|
+ '<b class="fn-left">' + autocompleteArray[i].name + '</b> '
|
||||||
+ autocompleteArray[i].type + '</span>';
|
+ autocompleteArray[i].type + '</span>';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "func":
|
case "func":
|
||||||
displayText = '<span>'// + autocompleteArray[i].class
|
displayText = '<span>'// + autocompleteArray[i].class
|
||||||
+ '<b>' + autocompleteArray[i].name + '</b>'
|
+ '<b>' + autocompleteArray[i].name + '</b>'
|
||||||
+ autocompleteArray[i].type.substring(4) + '</span>';
|
+ autocompleteArray[i].type.substring(4) + '</span>';
|
||||||
|
text += '()';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn("Can't handle autocomplete [" + autocompleteArray[i].class + "]");
|
console.warn("Can't handle autocomplete [" + autocompleteArray[i].class + "]");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
autocompleteHints[i] = {
|
autocompleteHints[i] = {
|
||||||
displayText: displayText,
|
displayText: displayText,
|
||||||
text: autocompleteArray[i].name
|
text: text
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue