~hp/d2tk

8d3a930ec2e195d590730860bd3f69b7c4195df8 — Hanspeter Portner 1 year, 5 days ago 7bf38d7 + e634e0d
Merge commit 'e634e0d900f02c2f74603c807870c50e60e021bf'
1 files changed, 3 insertions(+), 3 deletions(-)

M linenoise/encodings/utf8.c
M linenoise/encodings/utf8.c => linenoise/encodings/utf8.c +3 -3
@@ 469,7 469,7 @@ static size_t utf8BytesToCodePoint(const char* buf, size_t len, int* cp) {
 */
size_t linenoiseUtf8NextCharLen(const char* buf, size_t buf_len, size_t pos, size_t *col_len) {
    size_t beg = pos;
    int cp;
    int cp=0;
    size_t len = utf8BytesToCodePoint(buf + pos, buf_len - pos, &cp);
    if (isCombiningChar(cp)) {
        /* NOTREACHED */


@@ 478,7 478,7 @@ size_t linenoiseUtf8NextCharLen(const char* buf, size_t buf_len, size_t pos, siz
    if (col_len != NULL) *col_len = isWideChar(cp) ? 2 : 1;
    pos += len;
    while (pos < buf_len) {
        int cp;
        int cp=0;
        len = utf8BytesToCodePoint(buf + pos, buf_len - pos, &cp);
        if (!isCombiningChar(cp)) return pos - beg;
        pos += len;


@@ 494,7 494,7 @@ size_t linenoiseUtf8PrevCharLen(const char* buf, size_t buf_len, size_t pos, siz
    while (pos > 0) {
        size_t len = prevUtf8CharLen(buf, pos);
        pos -= len;
        int cp;
        int cp=0;
        utf8BytesToCodePoint(buf + pos, len, &cp);
        if (!isCombiningChar(cp)) {
            if (col_len != NULL) *col_len = isWideChar(cp) ? 2 : 1;