Subject: Re: bin/10116: vi somewhat easily confused by suspension
To: None <gnats-bugs@gnats.netbsd.org, tech-userlevel@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: tech-userlevel
Date: 05/18/2000 14:56:35
> 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 :)
No. Because vi installs its own tstp signal handler, it instead emulates
what libcurses would do. The problem is that we can change our keypad active
flag or send the relevant sequences in our handler, but if some program sends
those sequences itself, our view of the world is wrong. Or, if the program
with its own handler is suspended and something else sends the sequences
(i.e. another program using curses), we also lose.
vi expects the keypad() function to send the keypad enable/disable sequences
(when it calls keypad() with TRUE/FALSE respectively). I added the code to
do this yesterday. Also, I noticed that we didn't properly handle the case
where keypad(win, FALSE) is called during the program, so I added that too.
J
--
My other computer also runs NetBSD
http://www.netbsd.org/