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

Re: bugs found



I wrote:
::From: hoh@xxxxxxxxxx (Goran Larsson)
::2)
::	$ PROMPT=AAA
::	AAA_
::	AAAPROMPT=AA
::	AA_
::	AAPROMPT=A
::	 _
::	 APROMPT='$'
::	 APROMPT='$ '
::	$ _
::	Note that any one character prompt is replaced by a space.
:OK. I've found the problem (and another smaller one - the code gets to a 
:place I commented as 'shouldn't happen' - now I've got to remember why :-)).

I am still not totally sure why I had it commented as `shouldn't happen'.
Most likely it would have had to do with cleareol stuff and it may be
redundant, but since it may not I've left it in.

:Patch in a day or so.

Or a bit longer.


*** zle_refresh.c.old	Wed Sep  4 02:12:23 1996
--- zle_refresh.c	Tue Sep 10 20:17:00 1996
***************
*** 515,521 ****
  	if (ln && nbuf[ln])
  	    strncpy(nl, p1, winw + 1);	/* next time obuf will be up-to-date */
  	else
! 	    nl = p1;		/* shouldn't happen */
  	nllen = winw;
      } else if (ollen > nllen) { /* make new line at least as long as old */
  	p1 = halloc(ollen + 1);
--- 515,521 ----
  	if (ln && nbuf[ln])
  	    strncpy(nl, p1, winw + 1);	/* next time obuf will be up-to-date */
  	else
! 	    nl = p1;		/* don't keep padding for prompt line */
  	nllen = winw;
      } else if (ollen > nllen) { /* make new line at least as long as old */
  	p1 = halloc(ollen + 1);
***************
*** 553,558 ****
--- 553,567 ----
  	if (*ol)
  	    ol++;
  	ccs = 1;
+     }
+ 
+ /* 2c: if we're on the first line, start checking at the end of the prompt;
+    we shouldn't be doing anything within the prompt */
+ 
+     if (ln == 0 && pptw) {
+ 	nl += (pptw - ccs);
+ 	ol += (pptw - ccs);
+ 	ccs = pptw;
      }
  
  /* 3: main display loop - write out the buffer using whatever tricks we can */
--
Geoff Wing [mason@xxxxxxxxxxxxxxx]   PrimeNet - Internet Consultancy
  Web: http://www.primenet.com.au/   Facsimile: +61-3-9819 3788



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