1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

zsh-workers/8010

This commit is contained in:
Tanaka Akira 1999-09-23 13:03:26 +00:00
parent bdecf74ef1
commit 2bdcaa9a55
2 changed files with 4 additions and 3 deletions

View file

@ -6,7 +6,7 @@ startitem()
tindex(delete-to-char)
item(tt(delete-to-char))(
Read a character from the keyboard, and
delete from the cursor position up to and including the next
delete from the cursor position up to but not including the next
(or, with repeat count var(n), the var(n)th) instance of that character.
)
enditem()

View file

@ -43,7 +43,8 @@ deltochar(char **args)
while (dest != ll && line[dest] != c)
dest++;
if (dest != ll) {
dest++;
if (n > 0)
dest++;
if (!n) {
forekill(dest - cs, 0);
ok++;
@ -59,7 +60,7 @@ deltochar(char **args)
dest--;
if (line[dest] == c) {
if (!n) {
backkill(cs - dest, 1);
backkill(cs - dest - 1, 1);
ok++;
}
if (dest)