fix backspace (Control+?) in no-pty session (#257)

https://github.com/PowerShell/Win32-OpenSSH/issues/1011
This commit is contained in:
bagajjal 2018-01-16 21:59:27 -08:00 committed by Manoj Ampalam
parent 1f636bd8dd
commit 04c012c032

View File

@ -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--;