diff options
author | yeaji.shin <bloodevil4@gmail.com> | 2014-07-22 21:49:28 +0900 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-07-29 22:31:30 -0400 |
commit | f58fbec3e4418adc6a266f41ad2872451fab760a (patch) | |
tree | 60027998ae3d4b28a5e943102fa8c4d185646d9f /src/mongo/shell/mk_wcwidth.h | |
parent | c91a2c3392fc95be3ed07ba98a4d98b4db754b58 (diff) | |
download | mongo-f58fbec3e4418adc6a266f41ad2872451fab760a.tar.gz |
SERVER-6086 fixed shell to handle zero-width and double-width characters
recompute character width when refresh line.
use existing function mk_wcswidth.
add fall back when mk_wcswidth return -1 on calculateColumnPosition.
before set position, calculate width of characters.
Closes #717
Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'src/mongo/shell/mk_wcwidth.h')
-rw-r--r-- | src/mongo/shell/mk_wcwidth.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/shell/mk_wcwidth.h b/src/mongo/shell/mk_wcwidth.h index 822fd280f44..fa81dc61af2 100644 --- a/src/mongo/shell/mk_wcwidth.h +++ b/src/mongo/shell/mk_wcwidth.h @@ -62,3 +62,4 @@ */ extern int mk_wcwidth(int ucs); +extern int mk_wcswidth(const int *pwcs, size_t n); |