]> Sergey Matveev's repositories - nnn.git/commitdiff
Key \ only works in empty prompt
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 9 Dec 2019 19:48:51 +0000 (01:18 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 9 Dec 2019 19:48:51 +0000 (01:18 +0530)
src/nnn.c

index d81853486a88d047870997cbfefff074c0225f82..93e150c038dc6d2914629597f5a0125a0769338a 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2074,13 +2074,12 @@ static int filterentries(char *path)
                if (r == OK) {
                        /* Handle all control chars in main loop */
                        if ((*ch < ASCII_MAX && keyname(*ch)[0] == '^' && *ch != '^')
-                           || (*ch == '\\')) {
+                           || (*ch == '\\' && len == 1)) {
                                DPRINTF_D(*ch);
                                DPRINTF_S(keyname(*ch));
 
                                /* If there's a filter, try a command on ^P */
-                               if (cfg.filtercmd && (*ch == CONTROL('P') || *ch == '\\')
-                                   && len > 1) {
+                               if (cfg.filtercmd && *ch == CONTROL('P') && len > 1) {
                                        prompt_run(pln, (ndents ? dents[cur].name : ""), path);
 
                                        /* Clear the prompt */