mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
fix \r
This commit is contained in:
parent
66ffeb4245
commit
540eaf9828
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue