From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6383 invoked from network); 23 Jan 1997 06:04:21 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 23 Jan 1997 06:04:21 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id AAA24270; Thu, 23 Jan 1997 00:53:18 -0500 (EST) Resent-Date: Thu, 23 Jan 1997 00:53:18 -0500 (EST) From: gwing@primenet.com.au Message-ID: <19970123055429.6304.qmail@primenet.com.au> Subject: zle patch 1 To: zsh-workers@math.gatech.edu (zsh-workers) Date: Thu, 23 Jan 1997 16:54:29 +1100 (EST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"59c1_1.0.9x5.Eplvo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2817 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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 : Mobile : 0412 162 441