1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +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

@ -1,3 +1,9 @@
2008-04-24 Peter Stephenson <pws@csr.com>
* unposted: Jun T.: Src/Zle/zle_utils.c: backkill() in raw
mode didn't correctly calculate the number of characters to
kill.
2008-04-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Src/Zle/zle_misc.c: overwrite mode without

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();
}