switch ${%foo} to wcswidth-like behaviour – slightly problematic, and
the “set +U” case isn’t even handled committed to branch because I’d like to get more input on this, for now
This commit is contained in:
4
var.c
4
var.c
@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.96 2009/10/18 12:30:06 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.97 2009/11/28 14:21:47 tg Exp $");
|
||||
|
||||
/*
|
||||
* Variables
|
||||
@ -574,7 +574,7 @@ formatstr(struct tbl *vp, const char *s)
|
||||
char *p, *q;
|
||||
size_t psiz;
|
||||
|
||||
olen = utf_mbswidth(s);
|
||||
olen = utf_mbswidth(s, true);
|
||||
|
||||
if (vp->flag & (RJUST|LJUST)) {
|
||||
if (!vp->u2.field) /* default field width */
|
||||
|
Reference in New Issue
Block a user