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

Re: PATCH: make PROMPT_SP end-of-line marker configurable



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