[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Mar 20 12:36:29 2001 
Subject:Re: vedcharinsert in linux console 
From:Stephen Isard 
Volume-ID:1010320.05 

Aaron Sloman wrote:

> This was a topic raised previously by Andrew Sayer and then Chris
> Glur, I think, though your symptoms may be different. If $TERM is
> linux then Ved does not have a proper screen setup file.

Yes, I don't think I was paying enough attention at the time.
 
> There are two solutions.
<snip>
> 2. Try Andrew's linux/Ved package (1381 bytes):
> 
>     http://www.cs.bham.ac.uk/research/poplog/linuxterm.tar.gz

This looks like the right solution to me.  It will only only come into
play when you run ved in a console, and doesn't risk interfering with
other uses of ved or with non-poplog programs.  I'll try it out as soon
as I get a chance.

Following Chris Dollin's helpful message, I think I understand the
problem a little better, in case anyone is interested for future
reference.  Anyone not interested should stop reading at this point.

There are two separate terminal capabilities, one of being in an "insert
mode" and another of being able to insert single characters into the
midst of text on receipt of a special escape sequence before the
character.  A given terminal type might have either capability, or
neither or both. The terminfo manual page recommends against listing
both capabilities in a single termcap or terminfo entry, but the entries
for xterm and linux terminals do list both.  

When there is no explicit ved<termname>screen.p file available, ved
tries to set up the screen by reading the termcap file (or possibly
terminfo on some systems) and appears to implicitly assume that the
recommendation is being followed, and doesn't check.  Since there is an
explicit vedxtermscreen.p file, the termcap entry isn't consulted and
doesn't matter, but in the absence of a vedlinuxscreen.p file, the linux
termcap entry gets read and both vvedscreeninsertchar and
vvedscreeninsertmode are given non-empty values.  When it comes time to
insert a character, vvedscreeninsertchar gets sent, even though the
terminal is in insert mode.  This is a case where the belt and braces
approach is inappropriate and too many spaces get inserted on the
screen.

I think that it would be a good idea to change ved's behaviour in this
regard, and have it use just one capability if both turn out to be
available.  That would mean a better chance of functioning with new and
unfamiliar terminal types, and reduce the need for ever more
ved*screen.p files.  However I'm hesitant to attack the ved code myself.
There must be someone around who is more competent to do the job than I
am.

Steve