skip non-golang autocomplete

This commit is contained in:
Liang Ding 2015-01-21 17:28:57 +08:00
parent 7b62a9b3ed
commit dc74ec281a
1 changed files with 5 additions and 0 deletions

View File

@ -406,6 +406,11 @@ var editors = {
});
CodeMirror.commands.autocompleteAfterDot = function (cm) {
var mode = cm.getMode();
if (mode && "go" !== mode.name) {
return CodeMirror.Pass;
}
var token = cm.getTokenAt(cm.getCursor());
if ("comment" === token.type || "string" === token.type) {