vendor/assets/javascripts/codemirror/addons/hint/pig-hint.js in codemirror-rails-3.20 vs vendor/assets/javascripts/codemirror/addons/hint/pig-hint.js in codemirror-rails-3.21
- old
+ new
@@ -82,10 +82,10 @@
+ "StringMin StringSize TextLoader TupleSize Utf8StorageConverter").split(" ").join("() ").split(" ");
function getCompletions(token, context) {
var found = [], start = token.string;
function maybeAdd(str) {
- if (str.indexOf(start) == 0 && !arrayContains(found, str)) found.push(str);
+ if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
}
function gatherCompletions(obj) {
if(obj == ":") {
forEach(pigTypesL, maybeAdd);