[PATCH] Bug

- Do not print xterm titles without a tty. Writing escape sequences for xterm
  titles is unnecessary when the output is piped into another tool.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
Rainer Müller
2013-03-05 21:02:00 -05:00
committed by Paul Beckingham
parent 631d03ce38
commit 48b9fdc152
2 changed files with 3 additions and 1 deletions

View File

@@ -113,6 +113,8 @@ Bugs
+ Added missing localized confirmation strings (thanks to Rainer Müller). + Added missing localized confirmation strings (thanks to Rainer Müller).
+ Fixed bug that added an extra newline after setting the terminal title + Fixed bug that added an extra newline after setting the terminal title
(thanks to Rainer Müller). (thanks to Rainer Müller).
+ Fixed a bug where the terminal title was tried to be set without a tty
(thanks to Rainer Müller).
------ old releases ------------------------------ ------ old releases ------------------------------

View File

@@ -676,7 +676,7 @@ void Context::clear ()
// this output?'. // this output?'.
void Context::updateXtermTitle () void Context::updateXtermTitle ()
{ {
if (config.getBoolean ("xterm.title")) if (config.getBoolean ("xterm.title") && isatty (fileno (stdout)))
{ {
std::string command; std::string command;
a3.find_command (command); a3.find_command (command);