diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-05-09 15:19:26 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-05-09 15:19:26 +0000 |
commit | 3de049372c8ca458e096b8c8ece2d4f95da0fe82 (patch) | |
tree | bedf3c7648d8815163ff60f0a557a554fdc32545 /enter.c | |
parent | ee09e5f42399a6016f3e96dcbd03bab1effa07ff (diff) |
Edmund Grimley Evans' UTF-8 patch.
Diffstat (limited to 'enter.c')
-rw-r--r-- | enter.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -124,8 +124,11 @@ int _mutt_enter_string (unsigned char *buf, size_t buflen, int y, int x, j = begin; } move (y, x + j - begin); - for (; j < lastchar && j < begin + width; j++) - ADDCH (buf[j]); + { + int n = (lastchar < begin + width) ? lastchar : begin + width; + n = (n > j) ? n - j : 0; + addnstr ((char *)&buf[j], n); + } clrtoeol (); if (redraw != M_REDRAW_INIT) move (y, x + curpos - begin); |