projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d9c672
)
* lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width.
author
Mark Oteiza
<mvoteiza@udel.edu>
Sun, 11 Oct 2015 02:43:44 +0000
(22:43 -0400)
committer
Mark Oteiza
<mvoteiza@udel.edu>
Mon, 26 Oct 2015 16:15:50 +0000
(12:15 -0400)
`substring' does not account for full width characters.
lisp/net/eww.el
patch
|
blob
|
history
diff --git
a/lisp/net/eww.el
b/lisp/net/eww.el
index 6a315496fe074b8a38441d3dffad70a311888282..5748e88bbca9d7d2a500bcd7877e230231b549e0 100644
(file)
--- a/
lisp/net/eww.el
+++ b/
lisp/net/eww.el
@@
-1501,7
+1501,7
@@
If CHARSET is nil then use UTF-8."
(setq start (point)
title (plist-get bookmark :title))
(when (> (length title) width)
- (setq title (
substring title 0
width)))
+ (setq title (
truncate-string-to-width title
width)))
(insert (format format title (plist-get bookmark :url)) "\n")
(put-text-property start (1+ start) 'eww-bookmark bookmark))
(goto-char (point-min))))