Article View: comp.editors
Article #68Re: How can I resize Elvis in a xterm window?
From: Alex Martelli
Date: Mon, 02 Nov 1992 13:49
Date: Mon, 02 Nov 1992 13:49
32 lines
2226 bytes
2226 bytes
bgitv@termo.unit.no (Baard Grimsmo) writes: :In article <1992Oct23.145352.6439@Celestial.COM> bill@Celestial.COM (Bill Campbell) writes: :>In <1992Oct21.131950.16914@ugle.unit.no> bgitv@termo.unit.no (Baard Grimsmo) writes: :> :>:Is it possible to make Elvis(-1.6) resizing itself into the new window :>:when the xterm is resized by pulling its corner with the mouse? ... :My problem is to make Elvis resize inside a xterm window if the window is :stretched or shrinked using the mouse after Elvis is started. :Is it possible or not? My standard vi editor on my SGI-Indigo does! On most systems, it should be. A windowsize change *should* send a signal SIGWINCH to apps running in the window. This will not work very portably, though! On a HP-UX machine, a windowsize change interrupts a pending read() if a SIGWINCH handler is installed; on an Ultrix machine, it doesn't - you get the interrupt when the read() is satisfied; and so on - but at least you should get the windowsize change event at more-or-less appropriate times. Then you have to be able to query about the new windowsize. On Ultrix (BSD in general I think) you would do a ioctl() with TIOCGWINSZ, and I *think* the same should work under HP-UX. What the specific application could or should do upon encountering a windowsize change, and learning about the new size, is of course fully dependent upon the app itself (or the system-supplied curses, if the app relies on that). Sorry, I've never looked at Elvis internals so I can't help on that specific score... -- Email: martelli@cadlab.sublink.org Phone: ++39 (51) 6130360 CAD.LAB s.p.a., v. Ronzani 7/29, Casalecchio, Italia Fax: ++39 (51) 6130294
Technical Details
Message-ID:
<1992Nov02.134954.26286@cadlab.sublink.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!rutgers!modus!gear!cadlab!martelliReferences:
<1992Oct21.131950.16914@ugle.unit.no> <1992Oct23.145352.6439@Celestial.COM> <1992Oct28.073011.17480@ugle.unit.no>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!rutgers!modus!gear!cadlab!martelli From: martelli@cadlab.sublink.org (Alex Martelli) Newsgroups: comp.editors Subject: Re: How can I resize Elvis in a xterm window? Message-ID: <1992Nov02.134954.26286@cadlab.sublink.org> Date: 2 Nov 92 13:49:54 GMT References: <1992Oct21.131950.16914@ugle.unit.no> <1992Oct23.145352.6439@Celestial.COM> <1992Oct28.073011.17480@ugle.unit.no> Organization: CAD.LAB S.p.A., Bologna, Italia Lines: 32