From 658285541265f1f8933b5125ac742596491d8329 Mon Sep 17 00:00:00 2001
From: Arun Prakash Jana <engineerarun@gmail.com>
Date: Tue, 10 Dec 2019 01:18:51 +0530
Subject: [PATCH] Key \ only works in empty prompt
---
src/nnn.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c
index d8185348..93e150c0 100644
--- 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 */
--
2.52.0