Merge pull request #163 from jackyzy823/master

Disable outputing title escape sequences when WINPTY_FLAG_PLAIN_OUTPUT sets
This commit is contained in:
Ryan Prichard 2018-12-19 00:28:51 -08:00 committed by GitHub
commit a6174e8a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -602,9 +602,11 @@ void Agent::syncConsoleTitle()
{
std::wstring newTitle = m_console.title();
if (newTitle != m_currentTitle) {
std::string command = std::string("\x1b]0;") +
utf8FromWide(newTitle) + "\x07";
m_conoutPipe->write(command.c_str());
if (!m_plainMode && !m_conoutPipe->isClosed()) {
std::string command = std::string("\x1b]0;") +
utf8FromWide(newTitle) + "\x07";
m_conoutPipe->write(command.c_str());
}
m_currentTitle = newTitle;
}
}