summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eww-conf.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/eww-conf.el b/eww-conf.el
index a8fbd62..aaf48d3 100644
--- a/eww-conf.el
+++ b/eww-conf.el
@@ -516,14 +516,18 @@ Otherwise, fetch URL and afterwards try to restore the point."
(cond
(reuse-p
(set-buffer reuse-p)
- ;; we may use the default handler to restore the position here
+ ;; we may use the default handler to restore the position
+ ;; here
(with-current-buffer reuse-p
(goto-char (cdr position))
(cond
- ((search-forward (cdr front) nil t)
+ ((and
+ (stringp (cdr front))
+ (search-forward (cdr front) nil t))
(goto-char (match-beginning 0))))
(cond
- ((search-forward (cdr rear) nil t)
+ ((and (stringp (cdr rear))
+ (search-forward (cdr rear) nil t))
(goto-char (match-end 0))))))
(t
;; HACK, GIANT HACK!