1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 06:15:48 +01:00

Text zoom level rememberization magic.

This commit is contained in:
Kris Maglione
2011-10-09 20:01:19 -04:00
parent 06135d97db
commit 40d9642cc3
3 changed files with 29 additions and 6 deletions

View File

@@ -148,6 +148,8 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
let win = webProgress.DOMWindow;
if (win && uri) {
Buffer(win).updateZoom();
let oldURI = overlay.getData(win.document)["uri"];
if (overlay.getData(win.document)["load-idx"] === webProgress.loadedTransIndex
|| !oldURI || uri.spec.replace(/#.*/, "") !== oldURI.replace(/#.*/, ""))

View File

@@ -1363,7 +1363,8 @@ var CommandLine = Module("commandline", {
*/
preview: function preview() {
this.previewClear();
if (this.wildIndex < 0 || this.suffix || !this.activeContexts.length || this.waiting)
if (this.wildIndex < 0 || this.caret < this.input.value.length
|| !this.activeContexts.length || this.waiting)
return;
let substring = "";