* lisp/net/shr.el (shr-string-pixel-width): Return pixel-width,

not position (bug#29734).
This commit is contained in:
Katsumi Yamaoka 2017-12-18 02:53:26 +00:00
parent c51e797bba
commit a5b0a4e292

View file

@ -595,10 +595,11 @@ size, and full-buffer size."
;; shr-pixel-column uses save-window-excursion, which can reset
;; point to 1.
(let ((pt (point)))
(with-temp-buffer
(insert string)
(shr-pixel-column))
(goto-char pt))))
(prog1
(with-temp-buffer
(insert string)
(shr-pixel-column))
(goto-char pt)))))
(defsubst shr--translate-insertion-chars ()
;; Remove soft hyphens.