Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!mahendo!wlbr!roger.imsd.contel.com!mh From: mh@roger.imsd.contel.com (Mike Hoegeman) Newsgroups: comp.editors Subject: Re: resizing shelltool containing vi Message-ID: <1991Mar8.194115.23829@wlbr.imsd.contel.com> Date: 8 Mar 91 19:41:15 GMT References: <1991Mar5.072155.12296@TIRS.oz.au> <1991Mar06.034658.17775@convex.com> <6486@auspex.auspex.com> Sender: news@wlbr.imsd.contel.com (news) Organization: Contel FSD, Westlake Village, CA Lines: 27 Nntp-Posting-Host: roger.imsd.contel.com In article <6486@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>Your vi should catch the SIGWINCH and recompute your screen size. > >*And* not fuck up if the "vi" happens to be doing something when it gets >the SIGWINCH; alas, the BSD "vi" *does* fuck up - the way it "handles" >(to put it loosely) SIGWINCH is that it does a monster "longjmp" out of >the main command loop. If you were in the middle of reading in a file, >say, you lose. > For all you out there who find SIGWINCH desirable while editing. you might want to check the vi clone "elvis". It's pretty close to the real vi in functionality. I just tried doing all kinds of resizes of my NeWS version of elvis (in insert mode , etc.. ) and it seems to handle it well. If anybody is interested drop me line and I can make the source available for ftp. The NeWS version will fall back to a termcap mode of operation if it cannot connect to the news server. Even if you are not interested in having a NeWS version you might want to check it out anyway. It should be pretty easy to port to Xview since the NeWS wire service and Xview's Notifier are pretty similar in concept. As a quick hack You could probably just rip out the PostScript calls and stuff a ttysw Xview object in it's place I'm sure it would be a decent starting point for other X toolkits but it would probably be a little more work. mike hoegeman, mh@roger.imsd.contel.com