aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2015-10-10 22:43:44 -0400
committerMark Oteiza2015-10-26 12:15:50 -0400
commit3f828dc76be74e3587af74b5b3e3458f67f2b7ba (patch)
tree5fcd922ad05748b5e211b99afbf8d44440f021c7
parent0d9c67236cab3ffe9a8f1276e93a32e437c09bfc (diff)
downloademacs-3f828dc76be74e3587af74b5b3e3458f67f2b7ba.tar.gz
emacs-3f828dc76be74e3587af74b5b3e3458f67f2b7ba.zip
* lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width.
`substring' does not account for full width characters.
-rw-r--r--lisp/net/eww.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 6a315496fe0..5748e88bbca 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1501,7 +1501,7 @@ If CHARSET is nil then use UTF-8."
1501 (setq start (point) 1501 (setq start (point)
1502 title (plist-get bookmark :title)) 1502 title (plist-get bookmark :title))
1503 (when (> (length title) width) 1503 (when (> (length title) width)
1504 (setq title (substring title 0 width))) 1504 (setq title (truncate-string-to-width title width)))
1505 (insert (format format title (plist-get bookmark :url)) "\n") 1505 (insert (format format title (plist-get bookmark :url)) "\n")
1506 (put-text-property start (1+ start) 'eww-bookmark bookmark)) 1506 (put-text-property start (1+ start) 'eww-bookmark bookmark))
1507 (goto-char (point-min)))) 1507 (goto-char (point-min))))