Add further consideration to string-width (Bug#24972)
* lisp/ibuffer.el (ibuffer-compile-make-eliding-form): (ibuffer-compile-make-substring-form): Use truncate-string-to-width.
This commit is contained in:
parent
b13d6f2c39
commit
209d85fe56
1 changed files with 5 additions and 6 deletions
|
@ -1558,18 +1558,17 @@ If point is on a group name, this function operates on that group."
|
|||
,(if from-end-p
|
||||
`(concat ,ellipsis
|
||||
(substring ,strvar
|
||||
(length ibuffer-eliding-string)))
|
||||
`(concat
|
||||
(substring ,strvar 0 (- strlen ,(length ellipsis)))
|
||||
(string-width ibuffer-eliding-string)))
|
||||
`(truncate-string-to-width
|
||||
,strvar strlen nil nil
|
||||
,ellipsis))
|
||||
,strvar)
|
||||
strvar)))
|
||||
|
||||
(defun ibuffer-compile-make-substring-form (strvar maxvar from-end-p)
|
||||
(if from-end-p
|
||||
`(substring str
|
||||
(- strlen ,maxvar))
|
||||
`(substring ,strvar 0 ,maxvar)))
|
||||
`(truncate-string-to-width str (string-width str) (- strlen ,maxvar))
|
||||
`(truncate-string-to-width ,strvar ,maxvar)))
|
||||
|
||||
(defun ibuffer-compile-make-format-form (strvar widthform alignment)
|
||||
(let* ((left `(make-string tmp2 ?\s))
|
||||
|
|
Loading…
Add table
Reference in a new issue