diff options
| author | Mark Oteiza | 2015-10-10 22:43:44 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2015-10-26 12:15:50 -0400 |
| commit | 3f828dc76be74e3587af74b5b3e3458f67f2b7ba (patch) | |
| tree | 5fcd922ad05748b5e211b99afbf8d44440f021c7 | |
| parent | 0d9c67236cab3ffe9a8f1276e93a32e437c09bfc (diff) | |
| download | emacs-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.el | 2 |
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)))) |