From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: bug with camel case and delete-whole-word-match function
Date: Tue, 26 Jul 2016 20:22:05 +0200 [thread overview]
Message-ID: <57127.1469557325@hydra.kiddle.eu> (raw)
In-Reply-To: <20160726145224.7910b718@pwslap01u.europe.root.pri>
Peter wrote:
> > A similar issue occurs at the start of the line - element 1 contains
> > whitespace while element 3 doesn't.
>
> I'm not sure what you're testing. I've put a test function below and
> ran it with
>
> mwbs-test -w normal-subword $'one two ThreeFour ' $' \nFiveSix seven'
I probably should have said start/end of the buffer rather than of the
line.
It is the output of the following two:
mwbs-test ' ' ' word'
mwbs-test 'word ' ' '
In the latter case, this is:
start: ''
wd-before-c: 'word'
ws-before-c: ' '
ws-after-c: ''
wd-after-c: ''
ws-after-w: ''
end: ' '
So the spaces go in end rather than ws-after-c.
Whenever the cursor is between actual words, ws-before-c and ws-after-c will
cover the full area of whitespace surrounding the cursor. I don't see
why it should be different when you've got the end/start of the buffer.
For comparison, try: mwbs-test 'word ' ' x'
In vi word selection will grab a whole block of whitespace in these
cases.
> This should fix this in a way that makes it easy to add new features.
Thanks. Looks good to me.
> +If the option -A is given to tt(match-words-by-style), then
Given that it is the calling functions' responsibility to declare
matched_words, it could just use ${(t)matched_words} but I'm not
especially bothered.
Oliver
next prev parent reply other threads:[~2016-07-26 18:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <588168129.3340906.1467709726474.JavaMail.yahoo.ref@mail.yahoo.com>
2016-07-05 9:08 ` Oliver Kiddle
2016-07-05 10:19 ` Peter Stephenson
2016-07-05 16:12 ` Bart Schaefer
2016-07-05 16:28 ` Peter Stephenson
2016-07-23 23:06 ` Oliver Kiddle
2016-07-24 19:44 ` Peter Stephenson
2016-07-26 13:52 ` Peter Stephenson
2016-07-26 18:22 ` Oliver Kiddle [this message]
2016-07-27 8:54 ` Peter Stephenson
2016-07-27 23:05 ` Oliver Kiddle
2016-07-26 15:51 ` Peter Stephenson
2016-07-26 16:00 ` Peter Stephenson
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=57127.1469557325@hydra.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/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).