aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-08-26 02:35:01 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-08-26 02:35:01 +0530
commite8cf0dc663436e2ac30f737a17d8cc91efbdd364 (patch)
tree896583c21cf5305c7020e26e996e0ea1d561b2f4
parentf94235333a15d02dc5f9e211d8c40c297e0e6f8a (diff)
downloadnnn-e8cf0dc663436e2ac30f737a17d8cc91efbdd364.tar.gz
Handle multi-byte: 2 codepoints single column
Very frequent with Devanagari scripts ('matra's)
-rw-r--r--nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nnn.c b/nnn.c
index c7f4375..799ad0b 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();