From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18213 invoked from network); 22 Feb 2001 13:41:28 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2001 13:41:28 -0000 Received: (qmail 12089 invoked by alias); 22 Feb 2001 13:41:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13524 Received: (qmail 12076 invoked from network); 22 Feb 2001 13:41:20 -0000 To: zsh-workers@sunsite.auc.dk Path: mason From: mason@primenet.com.au (Geoff Wing) X-Newsgroups: lists.zsh.workers Subject: Re: Completion services + xterm auto-margin revisited Date: 22 Feb 2001 13:41:11 GMT Organization: PrimeNet Computer Consultants Distribution: local Message-ID: References: <200102221202.NAA18489@beta.informatik.hu-berlin.de> <002a01c09ccd$04fbe660$21c9ca95@mow.siemens.ru> Reply-To: mason@primenet.com.au NNTP-Posting-Host: coral.primenet.com.au X-Trace: coral.primenet.com.au 982849271 18202 203.43.15.2 (22 Feb 2001 13:41:11 GMT) X-Complaints-To: usenet@coral.primenet.com.au NNTP-Posting-Date: 22 Feb 2001 13:41:11 GMT User-Agent: slrn/0.9.6.3 (NetBSD) Andrej Borsenkow typed: :Well, it was a knowhow of Geoff (I still shudder when looking at refresh :code). It's commented. Well, the variables mostly are. And it understands am (automargin) ... mostly. I've been taking a quick look at the completion printing stuff. I presume the bits I should be looking at are: Zle/complist.c:compprintfmt() and compprintlist() Peter Stephenson typed: :By the way, completion listing for `typeset -' seems to tickle a relative :of an ancient bug with xterm auto-margin: one of the possible descriptions :is exactly 80 characters, but doesn't cause wraparound since there's :nothing to follow, and redisplaying the command line happens one line too :high. I have some vague memory of a discussion yonks ago (different to the one referenced above, I think) about whether a newline should be printed at the end of any list or such (hereafter I'm just calling them lists but also refer to other outputs) - one point here is that all lists need to be considered to have an extra line if the last line extends to the right margin, especially for any comparisons with ``lines'' (term height) so the top doesn't unexpectedly scroll off. It's slightly ugly when the list hits the bottom of the screen but I thought this happened. Maybe a couple of cases were missed. Point is: if the last output line is term width then you should always be printing "\n" (*) and presume an extra line in the calculations. (*) it's safest for 99.9% of used terminals whether or not they're correctly reporting ``am'' capability (and if they're incorrectly reporting it they'll have other problems anyway) Regards, -- Geoff Wing : Rxvt Stuff : Zsh Stuff :