zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: bug with camel case and delete-whole-word-match function
Date: Tue, 05 Jul 2016 17:28:26 +0100	[thread overview]
Message-ID: <20160705172826.6e66fa6a@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <160705091201.ZM16573@torch.brasslantern.com>

On Tue, 05 Jul 2016 09:12:01 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Jul 5, 11:19am, Peter Stephenson wrote:
> } Subject: Re: bug with camel case and delete-whole-word-match function
> }
> } However, if you're on the "S", you get "Is" before and "Some" after.
> } Again there's no white space, so there's nothing to indicate to the
> } calling function that these are two separate words rather than bits of
> } the same word.
> 
> Maybe I'm missing something, but shouldn't every capital letter be
> treated as the start of a word in this situation, even if it's under
> the cursor?

Yes, that's what happens.  But the caller doesn't know the difference
between this and getting "Som" and "e" where there's *no* start-of-word
under the cursor, just parts of the word before and on/after.  With
standard word matching it can tell by looking at white space, here it
could only tell by checking again if it's *really* a start of word.
That additional check is the issue.

Because, in normal cases, (word-bit-before '' '' word-bit-after) always
indicates two parts of the same word, the caller will naturally assume
that here unless it has the extra test.  Hence it's the "Is" "Some" that
behaves incorrectly, rather than the "Som" "e".

pws


  reply	other threads:[~2016-07-05 16: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 [this message]
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
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=20160705172826.6e66fa6a@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).