bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24972: 26.0.50; Multibyte characters are misaligned in ibuffer


From: Liu Hui
Subject: bug#24972: 26.0.50; Multibyte characters are misaligned in ibuffer
Date: Mon, 21 Nov 2016 14:00:14 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


在 2016年11月21日 02:58, Mark Oteiza 写道:

Liu Hui <address@hidden> writes:
As shown in the screenshot attached, multibyte characters (the second
line) are misaligned in ibuffer. The problem seems at least relevant
to the function `ibuffer-compile-format', which uses `length' rather
than `string-width' for characters.

Indeed, changing to string-width improves it. ibuffer should probably
also be using display properties to align the columns, but that's
another issue.

Committed in 7e2a8b1. Thanks for reporting


Thank you, but I find it does not work when the multibyte string is long. For example, if the string-width of buffer name, e.g. "一个很长很长的文件名", exceeds the default width of ibuffer column, M-x ibuffer will fail and issue an error.

According to the backtrace, it is because `ibuffer-compile-format' calls `ibuffer-compile-make-substring-form'/`ibuffer-compile-make-eliding-form', which use `substring' to truncate the multibyte string. A similar issue was reported in https://github.com/emacs-helm/helm/issues/170. Probably replacing `substring' solves the problem.





reply via email to

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