]> git.eshelyaron.com Git - emacs.git/commitdiff
eww point positioning tweak
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 3 Nov 2014 22:58:02 +0000 (23:58 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 3 Nov 2014 22:58:02 +0000 (23:58 +0100)
(eww-display-html): Don't leave point inside forms.

lisp/ChangeLog
lisp/net/eww.el

index ec62f4df58b86a9f83d16ad18728d7aa7af3fad7..77652d7d6bbd95ed8bf3bcb45d9e3cf5f7fd018c 100644 (file)
@@ -1,6 +1,7 @@
 2014-11-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * net/eww.el (eww-score-readability): Parse SVC images correctly.
+       (eww-display-html): Don't leave point inside forms.
 
        * net/shr.el: Ditto.
 
index 0f074696404b61675826d45629d067b89555cc0c..1eb00d302d5d0b712e47bf8183f678c75d145272 100644 (file)
@@ -300,7 +300,12 @@ word(s) will be searched for via `eww-search-prefix'."
          (when point
            (goto-char point))))
        (t
-       (goto-char (point-min)))))
+       (goto-char (point-min))
+       ;; Don't leave point inside forms, because the normal eww
+       ;; commands aren't available there.
+       (while (and (not (eobp))
+                   (get-text-property (point) 'eww-form))
+         (forward-line 1)))))
     (setq eww-current-url url
          eww-history-position 0)
     (eww-update-header-line-format)))