From: Arun Prakash Jana Date: Fri, 25 Aug 2017 21:05:01 +0000 (+0530) Subject: Handle multi-byte: 2 codepoints single column X-Git-Tag: v1.4~26 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e8cf0dc663436e2ac30f737a17d8cc91efbdd364;p=nnn.git Handle multi-byte: 2 codepoints single column Very frequent with Devanagari scripts ('matra's) --- diff --git a/nnn.c b/nnn.c index c7f4375c..799ad0b2 100644 --- a/nnn.c +++ b/nnn.c @@ -1024,9 +1024,9 @@ xreadline(char *fname) cleartimeout(); while (1) { - buf[len] = ' '; + clearprompt(); + buf[len] = '\0'; mvaddnwstr(y, x, buf, len + 1); - move(y, x + pos); if ((r = get_wch(ch)) != ERR) { if (r == OK) { @@ -2606,7 +2606,7 @@ nochange: /* Check if another file with same name exists */ if (faccessat(fd, tmp, F_OK, AT_SYMLINK_NOFOLLOW) != -1) { /* File with the same name exists */ - printprompt("Press 'y' to overwrite: "); + printprompt("Press 'y' to overwrite"); cleartimeout(); r = getch(); settimeout();