From 0b4056727f5dbaaa09acaa564dfc322cf2696389 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 14 Apr 2017 22:56:06 +0530 Subject: [PATCH] Support key 'q' to exit extra screens --- nnn.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nnn.c b/nnn.c index 90437f78..b8474bd2 100644 --- a/nnn.c +++ b/nnn.c @@ -898,8 +898,10 @@ show_stats(char* fpath, char* fname, struct stat *sb) } /* Show exit keys */ - printw("\n\n << (D)"); - while ((*buf = getch()) != 'D'); + printw("\n\n << (D/q)"); + while ((*buf = getch())) + if (*buf == 'D' || *buf == 'q') + break; return; } @@ -941,8 +943,10 @@ show_help(void) q Quit\n"); /* Show exit keys */ - printw("\n\n << (?)"); - while ((c = getch()) != '?'); + printw("\n\n << (?/q)"); + while ((c = getch())) + if (c == '?' || c == 'q') + break; return; }