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:
parent
bdecf74ef1
commit
2bdcaa9a55
2 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue