libdraw: enter/eenter: fix ^W removing the text on the right side of the tick
This commit is contained in:
parent
e0bfd148e2
commit
4ec97f73ee
2 changed files with 8 additions and 4 deletions
|
@ -152,13 +152,15 @@ nodraw:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(k == Ketb){
|
if(k == Ketb){
|
||||||
|
l = tick;
|
||||||
while(tick > 0){
|
while(tick > 0){
|
||||||
tick--;
|
tick--;
|
||||||
if(tick == 0 ||
|
if(tick == 0 ||
|
||||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buf[n = tick] = 0;
|
memmove(buf+tick, buf+l, n-l);
|
||||||
|
buf[n -= l-tick] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(k == Kbs){
|
if(k == Kbs){
|
||||||
|
|
|
@ -160,13 +160,15 @@ nodraw:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(k == Ketb){
|
if(k == Ketb){
|
||||||
|
l = tick;
|
||||||
while(tick > 0){
|
while(tick > 0){
|
||||||
tick--;
|
tick--;
|
||||||
if(tick == 0 ||
|
if(tick == 0 ||
|
||||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buf[n = tick] = 0;
|
memmove(buf+tick, buf+l, n-l);
|
||||||
|
buf[n -= l-tick] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(k == Kbs){
|
if(k == Kbs){
|
||||||
|
|
Loading…
Reference in a new issue