mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 03:11:15 +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)
|
tindex(delete-to-char)
|
||||||
item(tt(delete-to-char))(
|
item(tt(delete-to-char))(
|
||||||
Read a character from the keyboard, and
|
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.
|
(or, with repeat count var(n), the var(n)th) instance of that character.
|
||||||
)
|
)
|
||||||
enditem()
|
enditem()
|
||||||
|
|
|
@ -43,7 +43,8 @@ deltochar(char **args)
|
||||||
while (dest != ll && line[dest] != c)
|
while (dest != ll && line[dest] != c)
|
||||||
dest++;
|
dest++;
|
||||||
if (dest != ll) {
|
if (dest != ll) {
|
||||||
dest++;
|
if (n > 0)
|
||||||
|
dest++;
|
||||||
if (!n) {
|
if (!n) {
|
||||||
forekill(dest - cs, 0);
|
forekill(dest - cs, 0);
|
||||||
ok++;
|
ok++;
|
||||||
|
@ -59,7 +60,7 @@ deltochar(char **args)
|
||||||
dest--;
|
dest--;
|
||||||
if (line[dest] == c) {
|
if (line[dest] == c) {
|
||||||
if (!n) {
|
if (!n) {
|
||||||
backkill(cs - dest, 1);
|
backkill(cs - dest - 1, 1);
|
||||||
ok++;
|
ok++;
|
||||||
}
|
}
|
||||||
if (dest)
|
if (dest)
|
||||||
|
|
Loading…
Reference in a new issue