From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 08:09:48 -0800 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199563333-sup-1769@tomsk> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> Message-ID: <1199894905-sup-3585@south> Excerpts from Marcus Williams's message of Sat Jan 05 12:11:14 -0800 2008: > I think checking if $TERM is one of "xterm.*" and "rxvt.*". I'd also > add "screen" to the list as well (because screen deals with it and my > main usage of sup is during a screen session :) and maybe "cyg.*" for > whatever the cygwin term variable is (I think its cygwin but might be > cygterm cant remember). Needs to be a regex because you get stuff > like xterm-color. Ok, I just committed this to git master: commit 9722a770cadd44ddc4af6ddcb56eb8edb35c93b9 Author: William Morgan Date: Wed Jan 9 08:06:39 2008 -0800 only set terminal title if $TERM is an xterm or rxvt variant diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index fa1afe6..782695b 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -63,6 +63,7 @@ class Buffer @title = opts[:title] || "" @force_to_top = opts[:force_to_top] || false @x, @y, @width, @height = 0, 0, width, height + @in_x = ENV["TERM"] =~ /(xterm|rxvt)/ end def content_height; @height - 1; end @@ -262,7 +263,7 @@ EOS get_status_and_title @focus_buf # must be called outside of the ncurses end - print "\033]2;#{title}\07" if title + print "\033]2;#{title}\07" if title && @in_x Ncurses.mutex.lock unless opts[:sync] == false -- William