]> Sergey Matveev's repositories - nnn.git/commitdiff
Revert "Handle multi-byte: 2 codepoints single column"
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 25 Aug 2017 21:12:33 +0000 (02:42 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 25 Aug 2017 21:12:33 +0000 (02:42 +0530)
This reverts commit e8cf0dc663436e2ac30f737a17d8cc91efbdd364.

nnn.c

diff --git a/nnn.c b/nnn.c
index 799ad0b28b4b9401efeeabfea925eba699c00149..c7f4375c5c3631c1dd82d255ec5a62120054ecc9 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1024,9 +1024,9 @@ xreadline(char *fname)
        cleartimeout();
 
        while (1) {
-               clearprompt();
-               buf[len] = '\0';
+               buf[len] = ' ';
                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();