screen bugs/features

Wayne Davison davison at drivax.DRI
Wed Mar 8 15:26:29 AEST 1989


In article <2800015 at kailand> pwolfe at kailand.KAI.COM writes:
>On the BSD TERMCAP(5) manpage, "cl" is defined as "clear the screen".  It
>does not mention "and homes the cursor" anywhere.  Maybe on the terminal you
>use, clearing the screen homes the cursor, but this is *NOT* true for every
>terminal.  If you remove that Goto(), then you will break screen for some
>terminals.  While this might not affect you, but if you post patches to the
>net, you might break it for someone else.

An interesting thing about documentation -- it is often misleading.  The
programmers of many popular packages (including vi & rn) assume that
the variable "cl" homes the cursor.  If you change your termcap to only
clear the screen on a VT100 (from the default of cl=\E[2J\E[H), you will
find that many applications cease to function correctly.  It may not be
documented that way, but that is the way it is defined in actual termcaps.

If you still wish to leave the Goto() call in anyway, it should at least be
changed to be:

	Goto (-1, -1, 0, 0);

since you do not want an optimized cursor move after the ClearScreen()
call if you don't think you know where the cursor really is.  At least
it would only be superfluous, instead of erroneous.
--
 Wayne Davison                                        ...amdahl!drivax!davison



More information about the Comp.sources.bugs mailing list