Cygwin: pty: Revise the code which prevents undesired window title.
- In current pty, the window title can not be set from non-cygwin program due to the code which prevents overwriting the window title to "cygwin-console-helper.exe" in fhandler_pty_master::pty_ master_fwd_thread(). This patch fixes the issue.
This commit is contained in:
parent
ac1f63ef28
commit
d212bdc400
@ -3312,10 +3312,15 @@ fhandler_pty_master::pty_master_fwd_thread ()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (state == 4 && outbuf[i] == '\a')
|
else if (state == 4 && outbuf[i] == '\a')
|
||||||
|
{
|
||||||
|
const char *helper_str = "\\bin\\cygwin-console-helper.exe";
|
||||||
|
if (memmem (&outbuf[start_at], i + 1 - start_at,
|
||||||
|
helper_str, strlen (helper_str)))
|
||||||
{
|
{
|
||||||
memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1);
|
memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1);
|
||||||
state = 0;
|
|
||||||
rlen = wlen = start_at + rlen - i - 1;
|
rlen = wlen = start_at + rlen - i - 1;
|
||||||
|
}
|
||||||
|
state = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (outbuf[i] == '\a')
|
else if (outbuf[i] == '\a')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user