From 43d53386206b0eadafcfaf9e3406cef24d39075a Mon Sep 17 00:00:00 2001 From: Takashi Yano via Cygwin-patches Date: Mon, 23 Nov 2020 20:03:02 +0900 Subject: [PATCH] Cygwin: pty: Fix a bug in the code removing "CSI > Pm m". - The code added by 8121b606e843c001d5ca5213d24099e04ebc62ca has a bug which fails to remove multiple "CSI > Pm m" sequences. This patch fixes the bug. --- winsup/cygwin/fhandler_tty.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1033a2087..4aa9a4dd1 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2063,6 +2063,7 @@ fhandler_pty_master::pty_master_fwd_thread () memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); rlen = wlen = start_at + rlen - i - 1; state = 0; + i = start_at - 1; continue; } else