From 2e2947b70310c693f9fd5205e1265a34e3446e96 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 29 Sep 2013 14:51:20 -0700 Subject: [PATCH] Fix `:ha >$filename` for the nth time. --- common/modules/buffer.jsm | 4 +++- common/modules/dom.jsm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 7cb78a61..8339bdc6 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -1757,8 +1757,10 @@ var Buffer = Module("Buffer", { if (arg) { prefs.set("print.print_printer", PRINTER); + let { path } = io.File(arg.substr(1)); set("print_to_file", true); - set("print_to_filename", io.File(arg.substr(1)).path); + set("print_to_filename", path); + prefs.set("print_to_filename", path); dactyl.echomsg(_("print.toFile", arg.substr(1))); } diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index 810c86eb..0e1daa26 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -213,7 +213,7 @@ var DOM = Class("DOM", { for (let i = 0; i < this.length; i++) { let tmp = fn.call(self || update(obj, [this[i]]), this[i], i); - if (isObject(tmp) && "length" in tmp) + if (isObject(tmp) && !(tmp instanceof Ci.nsIDOMNode) && "length" in tmp) for (let j = 0; j < tmp.length; j++) res[res.length++] = tmp[j]; else if (tmp != null)