Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: display bug with compctl -X



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@xxxxxxxxxxxxxxx]   PrimeNet - Internet Consultancy
  Web: http://www.primenet.com.au/   Facsimile: +61-3-9819 3788



Messages sorted by: Reverse Date, Date, Thread, Author