[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 98544ea 1/2: Fix bs-show with wide characters (Bu
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] emacs-26 98544ea 1/2: Fix bs-show with wide characters (Bug#17822) |
Date: |
Wed, 19 Sep 2018 19:02:18 -0400 (EDT) |
branch: emacs-26
commit 98544ea3ea1638228db48c5ff993caded470d9c1
Author: Shigeru Fukaya <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix bs-show with wide characters (Bug#17822)
* lisp/bs.el (bs--insert-one-entry, bs-show-in-buffer): Use
string-width instead of length.
---
lisp/bs.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/bs.el b/lisp/bs.el
index 0d65da1..32431ba 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1159,7 +1159,7 @@ and move point to current buffer."
(bs-mode)
(let* ((inhibit-read-only t)
(map-fun (lambda (entry)
- (length (buffer-name entry))))
+ (string-width (buffer-name entry))))
(max-length-of-names (apply 'max
(cons 0 (mapcar map-fun list))))
(name-entry-length (min bs-maximal-buffer-name-column
@@ -1371,7 +1371,7 @@ normally *buffer-selection*."
apply-args)
(nth 3 column) ; align
(- min to-much)))
- (len (length new-string)))
+ (len (string-width new-string)))
(setq string (concat string new-string))
(when (> len min)
(setq to-much (- len min))))))