zsh-workers
 help / color / mirror / code / Atom feed
From: gwing@primenet.com.au
To: zsh-workers@math.gatech.edu (zsh-workers)
Subject: zle patch 1
Date: Thu, 23 Jan 1997 16:54:29 +1100 (EST)	[thread overview]
Message-ID: <19970123055429.6304.qmail@primenet.com.au> (raw)

Heyla,
  this is a patch on 3.0.3-test3 for "redisplay" bug Zoltan mentioned.
  I'm not a user of multiline prompts so I haven't done extensive testing of
  this.  Anyone who knows about prompt generation may want to check my
  counting of lines in a prompt.

Problems being (re)checked:
   2726/2760 (Robert F Tobler) - problem on Sun - can't duplicate yet.
   NeXTStep TERMCAP entry

Bugs being fixed:
   Coredump on 2 line terminal when using long status line.


*** zle.h.orig	Mon Aug 12 11:39:05 1996
--- zle.h	Thu Jan 23 15:37:12 1997
***************
*** 103,108 ****
--- 103,111 ----
  /* line length */
  ZLEXTERN int ll;
  
+ /* height of left prompt */
+ ZLEXTERN int lppth;
+ 
  /* last named command done */
  ZLEXTERN int lastnamed;
  
*** zle_misc.c.orig	Thu Jan 23 14:59:08 1997
--- zle_misc.c	Thu Jan 23 15:45:21 1997
***************
*** 803,809 ****
  /* get a prompt string */
  
  static char *buf, *bp1, *bl0, *fm, *pmpt;
! static int bracepos, bufspc;
  
  /**/
  char *
--- 803,809 ----
  /* get a prompt string */
  
  static char *buf, *bp1, *bl0, *fm, *pmpt;
! static int bracepos, bufspc, pmpth;
  
  /**/
  char *
***************
*** 815,820 ****
--- 815,821 ----
  	    *wp = 0;
  	return ztrdup("");
      }
+     pmpth = 1;
  
      if (!termok && (unset(INTERACTIVE)))
          init_term();
***************
*** 841,846 ****
--- 842,848 ----
  		*wp = 0;
  		*bp++ = ' ';
  		++*lenp;
+ 		pmpth++;
  	    }
  	    if (!*wp && *lenp) {
  		addbufspc(1);
***************
*** 850,855 ****
--- 852,859 ----
  	    }
  	}
      }
+     if (pmpt == lpmpt)
+ 	lppth = pmpth;
  
      return buf;
  }
***************
*** 1294,1302 ****
--- 1298,1309 ----
  	    *bp++ = c;
  	    bl0 = bp;
  	    lensb = 0;
+ 	    pmpth++;
  	    return;
  	}
      }
+     if (bp - bl0 == columns)
+ 	pmpth++;
      *bp++ = c;
  }
  
*** zle_refresh.c.orig	Thu Jan 23 14:58:34 1997
--- zle_refresh.c	Thu Jan 23 15:55:48 1997
***************
*** 258,263 ****
--- 258,269 ----
  	resetvideo();
  	resetneeded = 0;	/* unset */
  	oput_rpmpt = 0;		/* no right-prompt currently on screen */
+ 
+ 	/* we probably should only have explicitly set attributes */
+ 	tsetcap(TCALLATTRSOFF, 0);
+ 	tsetcap(TCSTANDOUTEND, 0);
+ 	tsetcap(TCUNDERLINEEND, 0);
+ 
          if (!clearflag)
              if (tccan(TCCLEAREOD))
                  tcout(TCCLEAREOD);
***************
*** 904,911 ****
  void
  redisplay(void)
  {
!     moveto(0, pptw);
!     zputc('\r', shout);
      resetneeded = 1;
      clearflag = 0;
  }
--- 910,918 ----
  void
  redisplay(void)
  {
!     moveto(0, 0);
!     zputc('\r', shout);		/* extra care */
!     tc_upcurs(lppth - 1);
      resetneeded = 1;
      clearflag = 0;
  }


-- 
Geoff Wing [gwing@primenet.com.au]   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


                 reply	other threads:[~1997-01-23  6:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19970123055429.6304.qmail@primenet.com.au \
    --to=gwing@primenet.com.au \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).