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

Refresh patch (Was: Refresh problem) (fwd)



I forward a patch from Geoff Wing. It appears to fix the problem

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------


---------- Forwarded message ----------
Date: 3 Jul 1997 12:11:37 +1000
From: gwing@xxxxxxxxxxxxxxx
Reply-To: mason@xxxxxxxxxxxxxxx
To: Andrej@xxxxxxxxxxxxxxx, Borsenkow@xxxxxxxxxxxxxxx, borsenkow.msk@xxxxxx
Subject: Refresh patch (Was: Refresh problem)

Try this.  It's a patch against 3.0.4, but it should work with 3.1.2:


*** zle_refresh.c.org	Mon Jun 23 15:12:47 1997
--- zle_refresh.c	Thu Jul  3 12:02:34 1997
***************
*** 575,583 ****
  	if (nllen)
  	    strncpy(p1, nl, nllen);
  	memset(p1 + nllen, ' ', winw - nllen);
! 	p1[winw] = p1[winw + 1] = '\0';
  	if (ln && nbuf[ln])
! 	    strncpy(nl, p1, winw + 2);	/* next time obuf will be up-to-date */
  	else
  	    nl = p1;		/* don't keep the padding for prompt line */
  	nllen = winw;
--- 575,584 ----
  	if (nllen)
  	    strncpy(p1, nl, nllen);
  	memset(p1 + nllen, ' ', winw - nllen);
! 	p1[winw] = '\0';
! 	p1[winw + 1] = (nllen < winw) ? '\0' : nl[winw + 1];
  	if (ln && nbuf[ln])
! 	    memcpy(nl, p1, winw + 2);	/* next time obuf will be up-to-date */
  	else
  	    nl = p1;		/* don't keep the padding for prompt line */
  	nllen = winw;


-- 
Geoff Wing [mason@xxxxxxxxxxxxxxx]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441



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