diff options
author | Li Jin <dragon-fly@qq.com> | 2022-07-26 14:35:32 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-07-26 14:35:32 +0800 |
commit | e191defb6545509a4ae0b402f2fac1fbe18551cd (patch) | |
tree | 70d80ee8f5de722db9a2629236ee0c3637b25ce3 /src/3rdParty/linenoise.hpp | |
parent | f7150a004e26f446fbf7a47bae368f209248fa67 (diff) | |
download | yuescript-e191defb6545509a4ae0b402f2fac1fbe18551cd.tar.gz yuescript-e191defb6545509a4ae0b402f2fac1fbe18551cd.tar.bz2 yuescript-e191defb6545509a4ae0b402f2fac1fbe18551cd.zip |
fix issue #107.
Diffstat (limited to 'src/3rdParty/linenoise.hpp')
-rw-r--r-- | src/3rdParty/linenoise.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
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 { | |||
1109 | CTRL_T = 20, /* Ctrl-t */ | 1109 | CTRL_T = 20, /* Ctrl-t */ |
1110 | CTRL_U = 21, /* Ctrl+u */ | 1110 | CTRL_U = 21, /* Ctrl+u */ |
1111 | CTRL_W = 23, /* Ctrl+w */ | 1111 | CTRL_W = 23, /* Ctrl+w */ |
1112 | CTRL_Z = 26, /* Ctrl+z */ | ||
1112 | ESC = 27, /* Escape */ | 1113 | ESC = 27, /* Escape */ |
1113 | BACKSPACE = 127 /* Backspace */ | 1114 | BACKSPACE = 127 /* Backspace */ |
1114 | }; | 1115 | }; |
@@ -2165,6 +2166,7 @@ inline int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, int buflen, con | |||
2165 | case 8: /* ctrl-h */ | 2166 | case 8: /* ctrl-h */ |
2166 | linenoiseEditBackspace(&l); | 2167 | linenoiseEditBackspace(&l); |
2167 | break; | 2168 | break; |
2169 | case CTRL_Z: | ||
2168 | case CTRL_D: /* ctrl-d, remove char at right of cursor, or if the | 2170 | case CTRL_D: /* ctrl-d, remove char at right of cursor, or if the |
2169 | line is empty, act as end-of-file. */ | 2171 | line is empty, act as end-of-file. */ |
2170 | if (l.len > 0) { | 2172 | if (l.len > 0) { |