diff options
| author | Shigeru Fukaya | 2014-06-21 12:35:55 +0900 |
|---|---|---|
| committer | Noam Postavsky | 2018-09-19 18:48:07 -0400 |
| commit | 98544ea3ea1638228db48c5ff993caded470d9c1 (patch) | |
| tree | 07f20163e52f0d0873c53e42de4731a38e5b69a5 | |
| parent | 85af51bab161473afed53517a81c2c3fb1f24b7c (diff) | |
| download | emacs-98544ea3ea1638228db48c5ff993caded470d9c1.tar.gz emacs-98544ea3ea1638228db48c5ff993caded470d9c1.zip | |
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.
| -rw-r--r-- | lisp/bs.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/bs.el b/lisp/bs.el index 0d65da14c72..32431ba4466 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -1159,7 +1159,7 @@ and move point to current buffer." | |||
| 1159 | (bs-mode) | 1159 | (bs-mode) |
| 1160 | (let* ((inhibit-read-only t) | 1160 | (let* ((inhibit-read-only t) |
| 1161 | (map-fun (lambda (entry) | 1161 | (map-fun (lambda (entry) |
| 1162 | (length (buffer-name entry)))) | 1162 | (string-width (buffer-name entry)))) |
| 1163 | (max-length-of-names (apply 'max | 1163 | (max-length-of-names (apply 'max |
| 1164 | (cons 0 (mapcar map-fun list)))) | 1164 | (cons 0 (mapcar map-fun list)))) |
| 1165 | (name-entry-length (min bs-maximal-buffer-name-column | 1165 | (name-entry-length (min bs-maximal-buffer-name-column |
| @@ -1371,7 +1371,7 @@ normally *buffer-selection*." | |||
| 1371 | apply-args) | 1371 | apply-args) |
| 1372 | (nth 3 column) ; align | 1372 | (nth 3 column) ; align |
| 1373 | (- min to-much))) | 1373 | (- min to-much))) |
| 1374 | (len (length new-string))) | 1374 | (len (string-width new-string))) |
| 1375 | (setq string (concat string new-string)) | 1375 | (setq string (concat string new-string)) |
| 1376 | (when (> len min) | 1376 | (when (> len min) |
| 1377 | (setq to-much (- len min)))))) | 1377 | (setq to-much (- len min)))))) |