zsh-workers
 help / color / mirror / code / Atom feed
* Questions
@ 2000-04-17  8:29 Sven Wischnowsky
  2000-04-17  9:08 ` Questions Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-04-17  8:29 UTC (permalink / raw)
  To: zsh-workers


Would anyone object if I applied the patch below to make newlines in
strings in the job text be output as spaces (keeping the `jobs' output 
better readable)?

And did anyone have the time to try the patch for scrolling completion 
lists? (I have a new version which is faster and allows status lines --
it's getting silly ;-)

Bye
 Sven

diff -u -r ../oz/Src/text.c ./Src/text.c
--- ../oz/Src/text.c	Fri Apr 14 23:34:43 2000
+++ ./Src/text.c	Fri Apr 14 23:56:30 2000
@@ -58,6 +58,7 @@
 taddstr(char *s)
 {
     int sl = strlen(s);
+    char c;
 
     while (tptr + sl >= tlim) {
 	int x = tptr - tbuf;
@@ -68,8 +69,8 @@
 	tlim = tbuf + tsiz;
 	tptr = tbuf + x;
     }
-    strcpy(tptr, s);
-    tptr += sl;
+    while ((c = *s++))
+	*tptr++ = (c == '\n' ? ' ' : c);
 }
 
 /**/

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-04-17  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-17  8:29 Questions Sven Wischnowsky
2000-04-17  9:08 ` Questions Peter Stephenson
2000-04-17  9:43   ` Questions Zefram

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