about summary refs log tree commit diff
path: root/Src/text.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 10:46:01 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 10:46:01 +0000
commitf0e8173762a14d7675dbc7a12ed11b31b7691c9f (patch)
tree298ca397f3026dc63706486478be6f8b74ca5e57 /Src/text.c
parentfcca6c721cde7780c91912aba0afbd44bd1818d5 (diff)
downloadzsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.gz
zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.xz
zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.zip
display newlines as spaces in job-texts (10788)
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/text.c b/Src/text.c
index ab6ca5eb9..8823a69bc 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -58,6 +58,7 @@ static void
 taddstr(char *s)
 {
     int sl = strlen(s);
+    char c;
 
     while (tptr + sl >= tlim) {
 	int x = tptr - tbuf;
@@ -68,8 +69,8 @@ taddstr(char *s)
 	tlim = tbuf + tsiz;
 	tptr = tbuf + x;
     }
-    strcpy(tptr, s);
-    tptr += sl;
+    while ((c = *s++))
+	*tptr++ = (c == '\n' ? ' ' : c);
 }
 
 /**/