eww point positioning tweak

(eww-display-html): Don't leave point inside forms.
This commit is contained in:
Lars Magne Ingebrigtsen 2014-11-03 23:58:02 +01:00
parent 1ca31e8cbd
commit b0481eb966
2 changed files with 7 additions and 1 deletions

View 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.

View 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)))