-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 11/9/2006 10:04 PM:
>
> This patch fixes this particular test case for me, but I have no idea if
> it is correct or breaks something else. The idea is that even when
> MB_CUR_MAX == 1, the cursor absolute position as calculated by
> _rl_col_width might not be accurate in the presence of invisible
> characters passed to mbrtowc. Perhaps an alternative patch would be to
> update _rl_col_width to do naive processing when MB_CUR_MAX == 1 in order
> to match the assumptions of the rest of readline.
Indeed, this alternative patch also seems to fix the test case for me:
- --- bash-3.2-orig/lib/readline/display.c 2006-09-14 12:20:12.000000000
-0600
+++ bash-3.2/lib/readline/display.c 2006-11-09 22:08:26.249000000 -0700
@@ -2380,6 +2380,8 @@ _rl_col_width (str, start, end)
if (end <= start)
return 0;
+ if (MB_CUR_MAX == 1)
+ return end - start;
memset (&ps, 0, sizeof (mbstate_t));
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFVAnN84KuGfSFAYARAlAMAJ4zLgK8KuU6aEkv0b0YqsydwLxckgCeM2Gn
vs/nh6cWKyg/ZdE4sYz2FeM=
=P2Jp
-----END PGP SIGNATURE-----
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash