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

Re: xterm cur&paste



Zoltan Hidvegi wrote:
:> But don't expect a patch before next Tuesday/Wednesday.

Of course, it could be earlier.
This should change it so CLEAREOL and new lines don't get used too early if
the line extends the whole way, but can be used if it doesn't.
This should fix up the multiline cut & paste, without affecting normal long
lines.


*** zle_refresh.c	1996/08/12 01:39:05	2.13
--- zle_refresh.c	1996/08/30 15:58:02
***************
*** 490,500 ****
  	char_ins = 0,		/* number of characters inserted/deleted */
  	col_cleareol,		/* clear to end-of-line from this column */
  	i, j,			/* tmp					 */
! 	nllen, ollen;		/* new and old line buffer lengths	 */
  
  /* 0: setup */
      nl = nbuf[ln];
!     nllen = nl ? strlen(nl) : 0;
      ol = obuf[ln] ? obuf[ln] : "";
      ollen = strlen(ol);
  
--- 490,501 ----
  	char_ins = 0,		/* number of characters inserted/deleted */
  	col_cleareol,		/* clear to end-of-line from this column */
  	i, j,			/* tmp					 */
! 	nllen, ollen,		/* new and old line buffer lengths	 */
! 	rnllen;			/* real new line buffer length		 */
  
  /* 0: setup */
      nl = nbuf[ln];
!     rnllen = nllen = nl ? strlen(nl) : 0;
      ol = obuf[ln] ? obuf[ln] : "";
      ollen = strlen(ol);
  
***************
*** 528,534 ****
     With automatic margins, we shouldn't do it if there is another line, in
     case it messes up cut and paste. */
  
!     if (hasam && ln < nlnct - 1)
  	col_cleareol = -2;	/* clearing eol would be evil so don't */
      else {
  	col_cleareol = -1;
--- 529,535 ----
     With automatic margins, we shouldn't do it if there is another line, in
     case it messes up cut and paste. */
  
!     if (hasam && ln < nlnct - 1 && rnllen == winw)
  	col_cleareol = -2;	/* clearing eol would be evil so don't */
      else {
  	col_cleareol = -1;


-- 
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