eww anchor pointer movement fixup
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 16 Dec 2013 23:29:47 +0000 (00:29 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 16 Dec 2013 23:29:47 +0000 (00:29 +0100)
* net/eww.el (eww-display-html): If we can't find the anchor we're
looking for, then go to point-min.

lisp/ChangeLog
lisp/net/eww.el

index 795aa80..8c19634 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/eww.el (eww-display-html): If we can't find the anchor we're
+       looking for, then go to point-min.
+
 2013-12-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix problems with CANNOT_DUMP and EMACSLOADPATH.
index 34c6728..afcd2ec 100644 (file)
@@ -271,8 +271,9 @@ word(s) will be searched for via `eww-search-prefix'."
        (shr-target-id
        (let ((point (next-single-property-change
                      (point-min) 'shr-target-id)))
-         (when point
-           (goto-char (1+ point)))))
+         (goto-char (if point
+                        (1+ point)
+                      (point-min)))))
        (t
        (goto-char (point-min)))))
     (setq eww-current-url url