[PATCH] lineedit: fix output formatting for tab completion

Denys Vlasenko vda.linux at googlemail.com
Tue Jun 1 06:34:57 UTC 2010


On Sunday 23 May 2010 23:34, Tomas Heinrich wrote:
> Hi,
> 
> there are two minor bugs in lineedit's tab completion output with regard 
> to unicode chars:
> 
> - unicode chars with visual width != 1 cause the columnar output to misalign
>    $ touch /tmp/a<U+2329>b
>    $ ls /tmp/^I^I
> 
> - chars configured as unsupported don't get substituted in the output
> 
> The attached patch should fix this.

I moved common block

+                       uni_stat_t uni_stat;
+                       printable_string(&uni_stat, matches[row]);
+                       l = uni_stat.unicode_width;

to new unicode_strwidth(str) function

Applied, thanks!
-- 
vda


More information about the busybox mailing list