This commit is contained in:
rsc 2005-11-26 15:53:37 +00:00
parent 66ffeb4245
commit 540eaf9828

View file

@ -350,7 +350,7 @@ winctl(void *arg)
while(up > rp && *(up-1) != '\n') while(up > rp && *(up-1) != '\n')
up--; up--;
if(up == rp) if(up == rp)
initial = wbswidth(w, 0x15); initial = wbswidth(w, '\r');
}else if(i == nr-1) }else if(i == nr-1)
*up = '\n'; *up = '\n';
break; break;
@ -757,7 +757,7 @@ wbswidth(Window *w, Rune c)
while(q > stop){ while(q > stop){
r = w->r[q-1]; r = w->r[q-1];
if(r == '\n'){ /* eat at most one more character */ 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; --q;
break; break;
} }