diff options
-rw-r--r-- | src/os_win32.c | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index dbfc4eeca7..3f2b3c3a4c 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -5176,7 +5176,7 @@ mch_system_piped(char *cmd, int options) { /* * For pipes: Check for CTRL-C: send interrupt signal to - * child. Check for CTRL-D: EOF, close pipe to child. + * child. */ if (len == 1 && cmd != NULL) { @@ -5186,10 +5186,22 @@ mch_system_piped(char *cmd, int options) // now put 9 as SIGKILL TerminateProcess(pi.hProcess, 9); } - if (ta_buf[ta_len] == Ctrl_D) + } + + /* + * Check for CTRL-D: EOF, close pipe to child. + * Ctrl_D may be decorated by _OnChar() + */ + if ((len == 1 || len == 4 ) && cmd != NULL) + { + if (ta_buf[0] == Ctrl_D + || (ta_buf[0] == CSI + && ta_buf[1] == KS_MODIFIER + && ta_buf[3] == Ctrl_D)) { CloseHandle(g_hChildStd_IN_Wr); g_hChildStd_IN_Wr = NULL; + len = 0; } } diff --git a/src/version.c b/src/version.c index a17ae156b2..f01cac8b7c 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 28, +/**/ 27, /**/ 26, |