From: Hugh McMaster Subject: cmd: Allow users to exit the 'more' command by pressing Ctrl-Z Message-Id: Date: Mon, 22 Sep 2014 22:28:13 +1000 If you run 'more' (with no arguments) in wineconsole, you end up in a continuous input stream. There is no way to exit the stream, other than pressing Ctrl-C, which terminates the console session badly. On Windows, users can exit 'more' by pressing Ctrl-Z followed by the Enter key on a blank line. This patch enables the same behaviour in wineconsole. From df4dbe79e626d038aabcdf91b752919e37712a6f Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 22 Sep 2014 21:40:58 +1000 Subject: cmd: Allow users to exit the 'more' command by pressing Ctrl-Z --- programs/cmd/builtins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index f7db4a9..faa528f 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -4413,6 +4413,7 @@ void WCMD_more (WCHAR *args) { WCMD_enter_paged_mode(moreStrPage); while (WCMD_ReadFile(hstdin, buffer, (sizeof(buffer)/sizeof(WCHAR))-1, &count)) { if (count == 0) break; /* ReadFile reports success on EOF! */ + if (((WCHAR*)buffer)[0] == 26) break; /* Exit on Ctrl-Z */ buffer[count] = 0; WCMD_output_asis (buffer); } -- 1.9.1