]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bs-show with wide characters (Bug#17822)
authorShigeru Fukaya <shigeru.fukaya@gmail.com>
Sat, 21 Jun 2014 03:35:55 +0000 (12:35 +0900)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 19 Sep 2018 22:48:07 +0000 (18:48 -0400)
* lisp/bs.el (bs--insert-one-entry, bs-show-in-buffer): Use
string-width instead of length.

lisp/bs.el

index 0d65da14c720fa445f3e55ac521ba2689c804b69..32431ba44664f8a2be5ca4e7f451a0386687ae56 100644 (file)
@@ -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))))))