From: Vin Shelton <acs@alumni.princeton.edu>
To: zsh-workers@sunsite.auc.dk
Subject: Re: delete-to-char
Date: 22 Sep 1999 22:47:23 -0400 [thread overview]
Message-ID: <m2so46s5s4.fsf@zion.ne.mediaone.net> (raw)
In-Reply-To: Vin Shelton's message of "20 Sep 1999 22:52:13 -0400"
Not waiting for the bits to dry, I generated this patch. In the
course of testing this, I found that M-digit did not work for me with
bindkey -me, even though bindkey thinks they are bound to
digit-argument. M-anydigit just beeps. "od -x" tells me that M-0
sends 0xb0, M-1 sends 0xb1, etc. Do I have my xterm/stty settings
wrong, or is this a bug in zsh.
ESC-digit does work, so I did manage to test this.
- vin
--- Src/Zle/deltochar.c.orig Wed Jun 23 08:12:25 1999
+++ Src/Zle/deltochar.c Wed Sep 22 22:24:16 1999
@@ -43,7 +43,8 @@
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 @@
dest--;
if (line[dest] == c) {
if (!n) {
- backkill(cs - dest, 1);
+ backkill(cs - dest - 1, 1);
ok++;
}
if (dest)
--- Doc/Zsh/mod_deltochar.yo.orig Tue Jun 22 04:02:49 1999
+++ Doc/Zsh/mod_deltochar.yo Wed Sep 22 22:28:37 1999
@@ -6,7 +6,7 @@
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()
>>>>> On 20 Sep 1999, I wrote:
Vin> OK, I'm waking up to the new world of modules and I came across the
Vin> deltochar module and the delete-to-char function. I hope I'm not
Vin> rehashing an old discussion, but both XEmacs (as of 21.0) and FSF
Vin> Emacs (as of at least 20.4) now define zap-to-char as deleting up to
Vin> but not including the specified character. It would be good, IMHO, to
Vin> have delete-to-char model that functionality. Currently
Vin> delete-to-char deletes up to and including the specified character.
Vin> I can submit a patch if people were amenable to this change.
Vin> Whaddaya think?
Vin> - vin
next prev parent reply other threads:[~1999-09-23 2:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-21 2:52 delete-to-char Vin Shelton
1999-09-23 2:47 ` Vin Shelton [this message]
1999-09-23 9:00 ` delete-to-char Peter Stephenson
1999-09-23 9:11 ` delete-to-char Peter Stephenson
1999-09-23 9:01 delete-to-char Sven Wischnowsky
1999-09-23 12:05 ` delete-to-char Vin Shelton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2so46s5s4.fsf@zion.ne.mediaone.net \
--to=acs@alumni.princeton.edu \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).