do not take Ctrl-Z since that have it's behavior defined for Linux (nw)

This commit is contained in:
Miodrag Milanovic 2016-11-07 09:17:17 +01:00
parent bc301335e7
commit f3723e3a5d

View File

@ -2281,11 +2281,11 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
break; break;
// job control is its own thing // job control is its own thing
//#ifndef _WIN32 #ifndef _WIN32
case ctrlChar('Z'): // ctrl-Z, job control case ctrlChar('Z'): // ctrl-Z, job control
disableRawMode(); // Returning to Linux (whatever) shell, leave raw disableRawMode(); // Returning to Linux (whatever) shell, leave raw
// mode // mode
// raise(SIGSTOP); // Break out in mid-line raise(SIGSTOP); // Break out in mid-line
enableRawMode(); // Back from Linux shell, re-enter raw mode enableRawMode(); // Back from Linux shell, re-enter raw mode
{ {
bufferSize = historyLineLength + 1; bufferSize = historyLineLength + 1;
@ -2295,9 +2295,9 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
dynamicRefresh(dp, tempUnicode.get(), historyLineLength, dynamicRefresh(dp, tempUnicode.get(), historyLineLength,
historyLinePosition); historyLinePosition);
} }
fprintf(stdout, "\n"); continue;
exit(0); break;
//#endif #endif
// these characters update the search string, and hence the selected input // these characters update the search string, and hence the selected input
// line // line
@ -2929,18 +2929,16 @@ int InputBuffer::getInputLine(PromptBase& pi) {
beep(); beep();
break; break;
//#ifndef _WIN32 #ifndef _WIN32
case ctrlChar('Z'): // ctrl-Z, job control case ctrlChar('Z'): // ctrl-Z, job control
disableRawMode(); // Returning to Linux (whatever) shell, leave raw disableRawMode(); // Returning to Linux (whatever) shell, leave raw
// mode // mode
//raise(SIGSTOP); // Break out in mid-line raise(SIGSTOP); // Break out in mid-line
enableRawMode(); // Back from Linux shell, re-enter raw mode enableRawMode(); // Back from Linux shell, re-enter raw mode
//if (!pi.write()) break; // Redraw prompt if (!pi.write()) break; // Redraw prompt
//refreshLine(pi); // Refresh the line refreshLine(pi); // Refresh the line
fprintf(stdout,"\n"); break;
exit(0); #endif
//break;
//#endif
// DEL, delete the character under the cursor // DEL, delete the character under the cursor
case 127: case 127: