]> Sergey Matveev's repositories - nnn.git/commitdiff
Position cursor in correct place for long names
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 29 Oct 2021 15:57:02 +0000 (21:27 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 29 Oct 2021 15:57:02 +0000 (21:27 +0530)
src/nnn.c

index aea0b6936e74715302e7d924af0597a0ae37d467..accef97b1862cc6cfe8b830f3daf38c7c8058c96 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3486,7 +3486,7 @@ static char *xreadline(const char *prefill, const char *prompt)
                buf[len] = ' ';
                attron(COLOR_PAIR(cfg.curctx + 1));
                if (pos > (size_t)(xcols - x)) {
-                       mvaddnwstr(xlines - 1, x, buf + (pos - (xcols - x)), xcols - x);
+                       mvaddnwstr(xlines - 1, x, buf + (pos - (xcols - x) + 1), xcols - x);
                        move(xlines - 1, xcols - 1);
                } else {
                        mvaddnwstr(xlines - 1, x, buf, len + 1);