Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: make PROMPT_SP end-of-line marker configurable
- X-seq: zsh-workers 26972
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: make PROMPT_SP end-of-line marker configurable
- Date: Mon, 18 May 2009 14:27:28 -0400
- In-reply-to: <200905171923.n4HJNRdC003859@xxxxxxxxxxxxxxxxxxx> (Peter Stephenson's message of "Sun, 17 May 2009 20:23:27 +0100")
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200905171923.n4HJNRdC003859@xxxxxxxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> writes:
> No, I've submitted it with the change.
Hi Peter, please apply this fix on top of what you committed
yesterday; my change had a slight bug..
thanks,
greg
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.222
diff -u -r1.222 utils.c
--- Src/utils.c 17 May 2009 18:23:10 -0000 1.222
+++ Src/utils.c 18 May 2009 18:22:16 -0000
@@ -1225,7 +1225,10 @@
str = promptexpand(eolmark, 1, NULL, NULL, NULL);
countprompt(str, &w, 0, -1);
opts[PROMPTPERCENT] = percents;
- fprintf(shout, "%s%*s\r", str, (int)columns - w - !hasxn, "");
+ zputs(str, shout);
+ for (w = (int)columns - w - !hasxn; w > 0; w--)
+ putc(' ', shout);
+ putc('\r', shout);
free(str);
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author