Subject: misc/11052: xterm "tput reset" fails to rset SGR
To: None <firstname.lastname@example.org>
From: John Hawkinson <email@example.com>
Date: 09/20/2000 19:34:23
>Synopsis: xterm "tput reset" fails to rset SGR
>Arrival-Date: Wed Sep 20 19:40:00 PDT 2000
>Originator: John Hawkinson
>Release: netbsd-1-5 of 15 Aug 2000
System: NetBSD zorkmid.mit.edu 1.5E NetBSD 1.5E (ZORKMID-$Revision: 1.2 $) #54: Fri Aug 18 01:53:49 EDT 2000 firstname.lastname@example.org:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
"tput init" fails to reset SGR characteristics (e.g. blink)
in an xterm. The problem is that the reset string outputs DECSC
and DECRC around the rest of the reset string, and instead of merely
saving the cursor position, SC/RC also save the SGR characteristics.
"tput reset" fails to do anything at all, which is counterintuitive.
Enter standout mode (explicitly, or by getting left that way from
a confused application. My usual case is running mutt over an ssh connection
and having the network fall out from under me, usually because I've
lost wireless network, by getting on the train or something ;-)):
Examine the reset sequence:
zorkmid% tput init | cat -v
That's: DECSC (Save cursor), DECSTBM (scrolling region), SGR (char
attributes), DECSET (various), DECRST (various), RM (replace mode), DECRC
Try it and watch it fail:
zorkmid% tput init
Not sure how this stuff is supposed to work. Is it an xterm bug?
or a termcap lib bug? Or a termcap entry bug?
It seems mightly peculiar, also, that "tput -Tvt100 init" and
"tput -Tvt100 reset" do nothing at all.
Perhaps someone should note this in tput(1)'s BUGS section :-(