From 540eaf9828948dccfecf75dd970e23a6942d3033 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 26 Nov 2005 15:53:37 +0000 Subject: [PATCH] fix \r --- src/cmd/9term/wind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c index e9d7ab0f..fae6756a 100644 --- a/src/cmd/9term/wind.c +++ b/src/cmd/9term/wind.c @@ -350,7 +350,7 @@ winctl(void *arg) while(up > rp && *(up-1) != '\n') up--; if(up == rp) - initial = wbswidth(w, 0x15); + initial = wbswidth(w, '\r'); }else if(i == nr-1) *up = '\n'; break; @@ -757,7 +757,7 @@ wbswidth(Window *w, Rune c) while(q > stop){ r = w->r[q-1]; if(r == '\n'){ /* eat at most one more character */ - if(q == w->q0) /* eat the newline */ + if(q == w->q0 && c != '\r') /* eat the newline */ --q; break; }