aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/nnn.c b/nnn.c
index 0e63081..9d668ed 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1235,6 +1235,28 @@ xreadline(char *fname)
continue;
}
+ if (*ch == CONTROL('A')) {
+ pos = 0;
+ continue;
+ }
+
+ if (*ch == CONTROL('E')) {
+ pos = len;
+ continue;
+ }
+
+ if (*ch == CONTROL('U')) {
+ clearprompt();
+ memmove(buf, buf + pos, (len - pos) << 2);
+ len -= pos;
+ pos = 0;
+ continue;
+ }
+
+ /* Filter out all other control chars */
+ if (keyname(*ch)[0] == '^')
+ continue;
+
/* TAB breaks cursor position, ignore it */
if (*ch == '\t')
continue;