diff --git a/content/buffer.js b/content/buffer.js index fe0c4d5d..ffd3412b 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -955,12 +955,12 @@ function Buffer() //{{{ switch (relationship) { case "next": - regexps = options["nextpattern"].split(","); + regexps = options.get("nextpattern").values; revString = "previous"; break; case "previous": // TODO: accept prev\%[ious] - regexps = options["previouspattern"].split(","); + regexps = options.get("previouspattern").values; revString = "next"; break; default: diff --git a/content/completion.js b/content/completion.js index 13a07d95..2208abf4 100644 --- a/content/completion.js +++ b/content/completion.js @@ -55,7 +55,7 @@ function CompletionContext(editor, name, offset) self.parent = parent; self.offset = parent.offset + (offset || 0); self.keys = util.cloneObject(parent.keys); - ["compare", "editor", "filterFunc", "keys", "quote", "title", "top"].forEach(function (key) + ["compare", "editor", "filterFunc", "keys", "process", "quote", "title", "top"].forEach(function (key) self[key] = parent[key]); ["contextList", "onUpdate", "selectionTypes", "tabPressed", "updateAsync", "value"].forEach(function (key) { self.__defineGetter__(key, function () this.top[key]); @@ -91,13 +91,14 @@ function CompletionContext(editor, name, offset) } return false; }]; + this.contexts = { name: this }; this.keys = { text: 0, description: 1, icon: "icon" }; this.offset = offset || 0; this.onUpdate = function () true; + this.process = []; this.tabPressed = false; this.title = ["Completions"]; this.top = this; - this.contexts = { name: this }; this.__defineGetter__("incomplete", function () this.contextList.some(function (c) c.parent && c.incomplete)); this.selectionTypes = {}; this.reset(); @@ -106,7 +107,6 @@ function CompletionContext(editor, name, offset) this.cache = {}; this.key = ""; this.itemCache = {}; - this.process = []; this._completions = []; // FIXME this.getKey = function (item, key) (typeof self.keys[key] == "function") ? self.keys[key].call(this, item) : item.item[self.keys[key]]; } @@ -1087,7 +1087,6 @@ function Completion() //{{{ context.keys = { text: "text", description: "url", icon: "icon" }; let process = context.process[0]; context.process = [function ({ text: text, item: item }) <> - {item.i} {item.indicator} { process.call(this, { item: item, text: text }) } ]; @@ -1116,7 +1115,7 @@ function Completion() //{{{ colorScheme: function colorScheme(context) { - options["runtimepath"].split(",").forEach(function (path) { + options.get("runtimepath").values.forEach(function (path) { context.fork(path, 0, null, function (context) { context.filter = path + "/colors/" + context.filter; completion.file(context, true); diff --git a/content/template.js b/content/template.js index f69d8375..9da251a8 100644 --- a/content/template.js +++ b/content/template.js @@ -201,34 +201,6 @@ const template = { }); }, - // returns a single row for a bookmark or history item - bookmarkItem: function bookmarkItem(item) - { - var extra = []; - if (item.keyword) - extra.push(['keyword', item.keyword, "hl-Keyword"]); - if (item.tags && item.tags.length > 0) - extra.push(["tags", item.tags.join(","), "hl-Tag"]); // no space, otherwise it looks strange, since we just have spaces to seperate tags from keywords - - return - }, - jumps: function jumps(index, elems) { return this.generic( diff --git a/content/util.js b/content/util.js index a95fd4ca..306c3e61 100644 --- a/content/util.js +++ b/content/util.js @@ -214,8 +214,7 @@ const util = { //{{{ } for (let u = strNum[0].length - 3; u > 0; u -= 3) // make a 10000 a 10,000 - strNum[0] = strNum[0].substring(0, u) - + "," + strNum[0].substring(u, strNum[0].length); + strNum[0] = strNum[0].substr(0, u) + "," + strNum[0].substr(u); if (unitIndex) // decimalPlaces only when > Bytes strNum[0] += "." + strNum[1];