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;
|
||||
}
|
||||
if(k == Ketb){
|
||||
l = tick;
|
||||
while(tick > 0){
|
||||
tick--;
|
||||
if(tick == 0 ||
|
||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||
break;
|
||||
}
|
||||
buf[n = tick] = 0;
|
||||
memmove(buf+tick, buf+l, n-l);
|
||||
buf[n -= l-tick] = 0;
|
||||
break;
|
||||
}
|
||||
if(k == Kbs){
|
||||
|
|
|
@ -160,13 +160,15 @@ nodraw:
|
|||
continue;
|
||||
}
|
||||
if(k == Ketb){
|
||||
l = tick;
|
||||
while(tick > 0){
|
||||
tick--;
|
||||
if(tick == 0 ||
|
||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||
strchr(" !\"#$%&'()*+,-./:;<=>?@`[\\]^{|}~", buf[tick-1]))
|
||||
break;
|
||||
}
|
||||
buf[n = tick] = 0;
|
||||
memmove(buf+tick, buf+l, n-l);
|
||||
buf[n -= l-tick] = 0;
|
||||
break;
|
||||
}
|
||||
if(k == Kbs){
|
||||
|
|
Loading…
Reference in a new issue