Skip to content

Commit 04c012c

Browse files
bagajjalmanojampalam
authored andcommitted
fix backspace (Control+?) in no-pty session (#257)
PowerShell/Win32-OpenSSH#1011
1 parent 1f636bd commit 04c012c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/win32/win32compat/shell-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ start_withno_pty(wchar_t *command)
15891589
}
15901590

15911591
/* for backspace, we need to send space and another backspace for visual erase */
1592-
if (buf[i] == '\b') {
1592+
if (buf[i] == '\b' || buf[i] == '\x7f') {
15931593
if (in_cmd_len > 0) {
15941594
GOTO_CLEANUP_ON_FALSE(WriteFile(pipe_out, "\b \b", 3, &wr, NULL));
15951595
in_cmd_len--;

0 commit comments

Comments
 (0)