]> Sergey Matveev's repositories - nnn.git/commitdiff
Ignore TAB in input prompt
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 9 Oct 2017 17:25:44 +0000 (22:55 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 9 Oct 2017 17:25:44 +0000 (22:55 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 214eb62d28a0ef82fae5ff34389ee37099d2fbcb..96125308d97fb7e0c51be9c31837cef844c42bd1 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1059,6 +1059,10 @@ xreadline(char *fname)
                                        continue;
                                }
 
+                               /* TAB breaks cursor position, ignore it */
+                               if (*ch == TAB || *ch == '\t')
+                                       continue;
+
                                if (pos < buflen) {
                                        memmove(buf + pos + 1, buf + pos, (len - pos) << 2);
                                        buf[pos] = *ch;