* PATCH: terminal prompt escapes
@ 1999-08-19 7:55 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-08-19 7:55 UTC (permalink / raw)
To: zsh-workers
While testing the stuff from my last mail I noticed that `print -P "%s"'
printed a `\210' for me. This was caused by an off-by-one error in
promptexpand().
Bye
Sven
--- os/prompt.c Mon Aug 9 10:40:42 1999
+++ Src/prompt.c Thu Aug 19 09:07:36 1999
@@ -171,11 +171,13 @@
*bp = 0;
if (!ns) {
/* If zero, Inpar, Outpar and Nularg should be removed. */
- for (bp = buf; *bp; bp++) {
+ for (bp = buf; *bp; ) {
if (*bp == Meta)
- bp++;
+ bp += 2;
else if (*bp == Inpar || *bp == Outpar || *bp == Nularg)
chuck(bp);
+ else
+ bp++;
}
}
return buf;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-08-19 7:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-19 7:55 PATCH: terminal prompt escapes Sven Wischnowsky
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).