From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id CAA10834 for ; Sat, 19 Oct 1996 02:53:31 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA06469; Fri, 18 Oct 1996 12:48:20 -0400 (EDT) Resent-Date: Fri, 18 Oct 1996 12:48:20 -0400 (EDT) From: Geoff Wing Message-Id: <199610181645.CAA10759@coral.primenet.com.au> Subject: Re: display bug with compctl -X To: pws@ifh.de (Peter Stephenson) Date: Sat, 19 Oct 1996 02:45:45 +1000 (EST) Cc: zsh-workers@math.gatech.edu (zsh-workers) In-Reply-To: <199610181412.QAA19051@hydra.ifh.de> from "Peter Stephenson" at Oct 18, 96 04:12:24 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"ekSfK2.0._a1.JJxPo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2255 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter Stephenson wrote: :The following is guaranteed repeatable on my system with 3.0.1-test3. :The terminal is an xterm. :% zsh -f :% compctl -D -X 'Default completion' -f :% setopt alwayslastprompt :% ls xxx^D # there's no such file :Default completion xx :# ^ cursor is here, one line too low. : :By the way, should alwayslastprompt be on by default? There was some :discussion about this years ago when Sven wrote it and I was rather :surprised to find it wasn't when I tried the above. It's not clear to :me why it shouldn't be. Well obviously the baseline shouldn't have it by default because I don't :-) listmatches() is going through with no possible matches and is calculating the number of lines to go up incorrectly. This whole section of code could use some more comments in it. Someone who knows this bit of code might want to check that this is the best solution. I've just looked at this patch, and the previous bit of code may or may not also need a similar check - your terminal would need to be set to 3 or 4 columns (depending on other factors). Setting at under, say, ten columns still causes serious problems / core-dumps in several bits of the code. *** zle_tricky.c.orig Sat Oct 19 01:32:41 1996 --- zle_tricky.c Sat Oct 19 02:14:59 1996 *************** *** 3558,3564 **** (!(haswhat & HAS_MISC) ? nfpl + nfsl : nlpl + nlsl))) / columns; } else { colsz = (ct + fct - 1) / fct; ! up = colsz + nlnct - clearflag; } /* Print the explanation string, if any. */ --- 3558,3564 ---- (!(haswhat & HAS_MISC) ? nfpl + nfsl : nlpl + nlsl))) / columns; } else { colsz = (ct + fct - 1) / fct; ! up = colsz + nlnct - clearflag + (ct == 0); } /* Print the explanation string, if any. */ -- Geoff Wing [gwing@primenet.com.au] PrimeNet - Internet Consultancy Web: http://www.primenet.com.au/ Facsimile: +61-3-9819 3788