mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:07:58 +01:00
Fix completion issue in mozilla-central trunk. Closes issue #172.
This commit is contained in:
@@ -1342,10 +1342,10 @@ const CommandLine = Module("commandline", {
|
|||||||
this._caret = this.caret;
|
this._caret = this.caret;
|
||||||
},
|
},
|
||||||
|
|
||||||
get caret() this.editor.selection.focusOffset,
|
get caret() this.editor.selection.getRangeAt(0).startOffset,
|
||||||
set caret(offset) {
|
set caret(offset) {
|
||||||
commandline.widgets.active.command.selectionStart = offset;
|
this.editor.selection.getRangeAt(0).setStart(this.editor.rootElement.firstChild, offset);
|
||||||
commandline.widgets.active.command.selectionEnd = offset;
|
this.editor.selection.getRangeAt(0).setEnd(this.editor.rootElement.firstChild, offset);
|
||||||
},
|
},
|
||||||
|
|
||||||
get start() this.context.allItems.start,
|
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
|
// Don't show 1-character substrings unless we've just hit backspace
|
||||||
if (substring.length < 2 && (!this._lastSubstring || this._lastSubstring.indexOf(substring) != 0))
|
if (substring.length < 2 && (!this._lastSubstring || this._lastSubstring.indexOf(substring) != 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._lastSubstring = substring;
|
this._lastSubstring = substring;
|
||||||
|
|
||||||
let value = this.completion;
|
let value = this.completion;
|
||||||
|
|||||||
@@ -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.
|
* @param {RegExp} re The regexp showable source of which is to be returned.
|
||||||
* @returns {string}
|
* @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,
|
maxErrors: 15,
|
||||||
|
|||||||
Reference in New Issue
Block a user