Subject: Re: changed wsvt25 termcap entry causes regression
To: NetBSD-current Users's Discussion List <current-users@netbsd.org>
From: Greg A. Woods <woods@planix.com>
List: current-users
Date: 02/23/2007 14:31:16
At Fri, 23 Feb 2007 17:03:19 +0100,
Jukka Salmi wrote:
>
> since the recent [1]change of the wsvt25 termcap entry I noticed the
> following on wscons(4) terminals (TERM=wsvt25m): when reading a file
> using less(1), scrolling forward one line at a time using `j' doesn't
> work anymore if the first character of the line is a tab. Is anybody
> able to reproduce this? Try e.g. [2]this file...
Hmmmm.... The description in the commit doesn't seem to describe the
change completely. "is" was changed, even though the part removed was
added to "ti", I don't think it was a good idea to remove that part of
the sequence from "is" since some programs may only use "is". There's
no problem, so far as I can tell, with sending the "\E)0" part twice if
some program actually uses both "is" and "ti".
On the other hand 'less' uses "ti" and "te", but not "is". :-)
I'm also not sure it was a good idea to negate "if". That may be the
real cause of the observed problem. So far as I can tell it is always
necessary to initialize the tab settings on wscons (in its mis-named
vt100 emulation mode) (and why it's necessary to use "stty oxtabs" for
raw output by non-curses programs). Testing may not have revealed this
problem unless the tab settings were purposefully scrambled or cleared
after each test. On the other hand I don't see immediately that 'less'
uses "if". Hmmm.... Maybe something else used during testing did use
"if"?
It's also not necessary to use vt220-8. The full vt220 entry, even
after being appended to the new wsvt25 (and wsvt25m) entry does fit
within 1023 bytes just fine.
----------------------------
revision 1.99
date: 2007/02/16 21:33:12; author: wiz; state: Exp; lines: +3 -3
Add if, NC, ti and te to wsvt25 termcap entry. Should fix PR 34995.
Patch from Onno van der Linden (and Sergey Svishchev).
----------------------------
@@ -930,9 +930,9 @@
# NetBSD "wscons" emulator in vt220 mode
wsvt25|NetBSD wscons in 25 line DEC VT220 mode:\
- :Co#8:pa#64:it#8:ut:co#80:li#25:vb@:xn@:\
+ :Co#8:pa#64:it#8:ut:co#80:li#25:vb@:xn@:if@:NC#2:\
:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:k;=\E[21~:\
- :AB=\E[4%dm:AF=\E[3%dm:op=\E[m:is=\E[!p\E)0:\
+ :AB=\E[4%dm:AF=\E[3%dm:op=\E[m:is=\E[!p:ti=\E)0:te=\E)B:\
:ac=``aaffggjjkkllmmnnqqttuuvvwwxxyyzz{{}}~~:\
:@7=\E[8~:kh=\E[7~:kH=\E[8~:rs=\Ec:tc=vt220-8:
--
Greg A. Woods
H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>