1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

unposted: Jun T.: fix backkill() calculation of charaters to kill

This commit is contained in:
Peter Stephenson 2008-04-24 10:18:59 +00:00
parent 62b7e68a63
commit cca52d8edb
2 changed files with 12 additions and 8 deletions

View file

@ -589,20 +589,18 @@ cuttext(ZLE_STRING_T line, int ct, int flags)
mod_export void
backkill(int ct, int flags)
{
int i;
UNMETACHECK();
if (flags & CUT_RAW) {
i = (zlecs -= ct);
zlecs -= ct;
} else {
int n = ct;
while (n--)
int origcs = zlecs;
while (ct--)
DECCS();
i = zlecs;
ct = origcs - zlecs;
}
cut(i, ct, flags);
shiftchars(i, ct);
cut(zlecs, ct, flags);
shiftchars(zlecs, ct);
CCRIGHT();
}