Subject: Re: bin/10116: vi somewhat easily confused by suspension
To: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
From: David Brownlee <abs@netbsd.org>
List: tech-userlevel
Date: 05/17/2000 18:17:17
On Wed, 17 May 2000, Julian Coleman wrote:

> The cause is that we don't send the escape sequences for keypad on/keypad off
> when the keypad() function is called.  This isn't clear in the documentation
> but is what the Solaris implementation does.  It seems to me that this can be
> suboptimal in some cases, but in order to be compatible, I will change our
> curses to do this.
> 
> The problem occurs because vi installs its own signal handler which bypasses
> our curses' handler (which would send the correct escape sequences).  Thus,
> keypad mode is left set when vi suspends and is then unset when a curses or
> termcap using program is run (e.g. vi or man).  When you resume vi, the
> keypad is now unset.
> 

	Doesn't vi call some kind of 'curses re-enable' function when it
	resumes. If so, presumably it would be possible to detect in that
	if keypad mode was supposed to be active and explicitly reinit
	it. (Apologies if I'm wandering off nowhere here :)

		David/absolute
				       -- www.netbsd.org: No hype required --