From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13095 invoked from network); 6 Mar 1997 05:05:43 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 6 Mar 1997 05:05:43 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id XAA10997; Wed, 5 Mar 1997 23:51:30 -0500 (EST) Resent-Date: Wed, 5 Mar 1997 23:51:30 -0500 (EST) From: "Bart Schaefer" Message-Id: <970305205858.ZM8212@candle.brasslantern.com> Date: Wed, 5 Mar 1997 20:58:58 -0800 In-Reply-To: gwing@primenet.com.au "Re: zle_refresh patch 2" (Mar 6, 2:56pm) References: <19970306035603.7956.qmail@primenet.com.au> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: gwing@primenet.com.au, zsh-workers@math.gatech.edu (zsh-workers) Subject: Re: zle_refresh patch 2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"wnCVL3.0.mh2.Hra7p"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2961 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mar 6, 2:56pm, gwing@primenet.com.au wrote: } Subject: Re: zle_refresh patch 2 } } sorry, I haven't had much time up until now. I'm going to have to look at } the way 3.1.* handles the Zle module before I can send a patch for all the } problems - previously I've been sending patches to 3.0.* I think you can continue patching 3.0.3-test4 as long as you don't make reference to zle globals in non-zle .c files. Zoltan? } The reason that the zle went into singlelinemode style when the terminal } went down to 1 or 2 lines is because it was simpler. I seem to remember, it } avoided *lots* of conditionals all the way through the code. I can change } this and I would also probably have to change quite a bit of the prompt code } to count number of lines, etc. It was Peter's assertion that changing the value of "termok" was sufficient to change zle into a sane state, without having to toggle the *ZLE options. I tried this (see my most recent patch) and it seems to work OK; I'm just worried that putprompt() or zleread() is going to call init_term() at a bad time, and thus reset "termok" independently of lines/columns. } There are a couple of choices here; when a terminal decreases number of } lines to 1 or 2: } 1) it goes into singlelinemode style (without setting SINGLE_LINE_ZLE) } until the terminal increases its lines above 2. This is fine as far as *I'm* concerned. } There are also a couple of bugs which won't show up until the terminal goes } down to < 5 or so columns. I think I kept getting destroyed memory structs } so I didn't work out what buffers were being overflowed. With `termok = TERM_BAD' in effect, I was able to set COLUMNS=2 without any crashes. Of course, all I could ever see was the < and > that mean that there's more text left and right of the visible screen, but I was able to blind-type various commands and finally reset COLUMNS=80 with no apparent ill effects. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern