summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--3rdparty/linenoise-ng/src/linenoise.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/3rdparty/linenoise-ng/src/linenoise.cpp b/3rdparty/linenoise-ng/src/linenoise.cpp
index 678a6bba78b..7c042e2fe1f 100644
--- a/3rdparty/linenoise-ng/src/linenoise.cpp
+++ b/3rdparty/linenoise-ng/src/linenoise.cpp
@@ -2281,11 +2281,11 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
break;
// job control is its own thing
-//#ifndef _WIN32
+#ifndef _WIN32
case ctrlChar('Z'): // ctrl-Z, job control
disableRawMode(); // Returning to Linux (whatever) shell, leave raw
// mode
- // raise(SIGSTOP); // Break out in mid-line
+ raise(SIGSTOP); // Break out in mid-line
enableRawMode(); // Back from Linux shell, re-enter raw mode
{
bufferSize = historyLineLength + 1;
@@ -2295,9 +2295,9 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
dynamicRefresh(dp, tempUnicode.get(), historyLineLength,
historyLinePosition);
}
- fprintf(stdout, "\n");
- exit(0);
-//#endif
+ continue;
+ break;
+#endif
// these characters update the search string, and hence the selected input
// line
@@ -2929,18 +2929,16 @@ int InputBuffer::getInputLine(PromptBase& pi) {
beep();
break;
-//#ifndef _WIN32
+#ifndef _WIN32
case ctrlChar('Z'): // ctrl-Z, job control
disableRawMode(); // Returning to Linux (whatever) shell, leave raw
// mode
- //raise(SIGSTOP); // Break out in mid-line
+ raise(SIGSTOP); // Break out in mid-line
enableRawMode(); // Back from Linux shell, re-enter raw mode
- //if (!pi.write()) break; // Redraw prompt
- //refreshLine(pi); // Refresh the line
- fprintf(stdout,"\n");
- exit(0);
- //break;
-//#endif
+ if (!pi.write()) break; // Redraw prompt
+ refreshLine(pi); // Refresh the line
+ break;
+#endif
// DEL, delete the character under the cursor
case 127: