1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 22:28:00 +01:00

Fix completion issue in mozilla-central trunk. Closes issue #172.

This commit is contained in:
Kris Maglione
2010-12-15 21:34:33 -05:00
parent f07f067309
commit 69b87a6edd
2 changed files with 5 additions and 4 deletions

View File

@@ -1342,10 +1342,10 @@ const CommandLine = Module("commandline", {
this._caret = this.caret;
},
get caret() this.editor.selection.focusOffset,
get caret() this.editor.selection.getRangeAt(0).startOffset,
set caret(offset) {
commandline.widgets.active.command.selectionStart = offset;
commandline.widgets.active.command.selectionEnd = offset;
this.editor.selection.getRangeAt(0).setStart(this.editor.rootElement.firstChild, offset);
this.editor.selection.getRangeAt(0).setEnd(this.editor.rootElement.firstChild, offset);
},
get start() this.context.allItems.start,
@@ -1394,6 +1394,7 @@ const CommandLine = Module("commandline", {
// Don't show 1-character substrings unless we've just hit backspace
if (substring.length < 2 && (!this._lastSubstring || this._lastSubstring.indexOf(substring) != 0))
return;
this._lastSubstring = substring;
let value = this.completion;

View File

@@ -971,7 +971,7 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
* @param {RegExp} re The regexp showable source of which is to be returned.
* @returns {string}
*/
getSource: function regexp_getSource(re) re.source.replace(/\\(.)/g, function (m0, m1) m1 === "/" ? "/" : m0),
getSource: function regexp_getSource(re) re.source.replace(/\\(.)/g, function (m0, m1) m1 === "/" ? "/" : m0)
}),
maxErrors: 15,