emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3f828dc: * lisp/net/eww.el (eww-bookmark-prepare):


From: Mark Oteiza
Subject: [Emacs-diffs] master 3f828dc: * lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width.
Date: Mon, 26 Oct 2015 16:15:58 +0000

branch: master
commit 3f828dc76be74e3587af74b5b3e3458f67f2b7ba
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>

    * lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width.
    
    `substring' does not account for full width characters.
---
 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 6a31549..5748e88 100644
--- 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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]