Skip to content

Commit fdaf7b5

Browse files
committed
performance up completer except wildmode=longest
1 parent 2a315ec commit fdaf7b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

common/content/completion.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,13 @@ const CompletionContext = Class("CompletionContext", {
208208
__proto__: item
209209
}));
210210
});
211-
return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring };
211+
return { start: minStart, items: util.Array.flatten(items),
212+
get longestSubstring() {
213+
var value = this.longestAllSubstring;
214+
Object.defineProperty(this, "longestSubstring", { value: value});
215+
return value;
216+
}
217+
};
212218
}
213219
catch (e) {
214220
liberator.echoerr(e);

0 commit comments

Comments
 (0)