From e191defb6545509a4ae0b402f2fac1fbe18551cd Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 26 Jul 2022 14:35:32 +0800 Subject: fix issue #107. --- src/3rdParty/linenoise.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/3rdParty/linenoise.hpp b/src/3rdParty/linenoise.hpp index 06add16..604f889 100644 --- a/src/3rdParty/linenoise.hpp +++ b/src/3rdParty/linenoise.hpp @@ -1109,6 +1109,7 @@ enum KEY_ACTION { CTRL_T = 20, /* Ctrl-t */ CTRL_U = 21, /* Ctrl+u */ CTRL_W = 23, /* Ctrl+w */ + CTRL_Z = 26, /* Ctrl+z */ ESC = 27, /* Escape */ BACKSPACE = 127 /* Backspace */ }; @@ -2165,6 +2166,7 @@ inline int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, int buflen, con case 8: /* ctrl-h */ linenoiseEditBackspace(&l); break; + case CTRL_Z: case CTRL_D: /* ctrl-d, remove char at right of cursor, or if the line is empty, act as end-of-file. */ if (l.len > 0) { -- cgit v1.2.3-55-g6feb