From 04c012c0323b23aabda3985a8fb1919f762de325 Mon Sep 17 00:00:00 2001 From: bagajjal Date: Tue, 16 Jan 2018 21:59:27 -0800 Subject: [PATCH] fix backspace (Control+?) in no-pty session (#257) https://github.com/PowerShell/Win32-OpenSSH/issues/1011 --- contrib/win32/win32compat/shell-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/win32/win32compat/shell-host.c b/contrib/win32/win32compat/shell-host.c index 5d5b0acd9..31f1619e0 100644 --- a/contrib/win32/win32compat/shell-host.c +++ b/contrib/win32/win32compat/shell-host.c @@ -1589,7 +1589,7 @@ start_withno_pty(wchar_t *command) } /* for backspace, we need to send space and another backspace for visual erase */ - if (buf[i] == '\b') { + if (buf[i] == '\b' || buf[i] == '\x7f') { if (in_cmd_len > 0) { GOTO_CLEANUP_ON_FALSE(WriteFile(pipe_out, "\b \b", 3, &wr, NULL)); in_cmd_len--;