Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f796c6d000001486-ef-577be02cb62c
Date: Tue, 05 Jul 2016 17:28:26 +0100
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: bug with camel case and delete-whole-word-match function
Message-id: <20160705172826.6e66fa6a@pwslap01u.europe.root.pri>
In-reply-to: <160705091201.ZM16573@torch.brasslantern.com>
References: <588168129.3340906.1467709726474.JavaMail.yahoo.ref@mail.yahoo.com>
 <588168129.3340906.1467709726474.JavaMail.yahoo@mail.yahoo.com>
 <20160705111900.7e1599f0@pwslap01u.europe.root.pri>
 <160705091201.ZM16573@torch.brasslantern.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xK7o6D6rDDRrazSwONj9kcmD0WHXw
	A1MAYxSXTUpqTmZZapG+XQJXxs2za9gK2rkq7l+dx9rA2MHRxcjBISFgIvHwB0sXIyeQKSZx
	4d56ti5GLg4hgaWMEqsb+lkhnBlMEgf7O6Gc04wSixZNZIJwzjBKzFvVyAjSzyKgKvHv3Scw
	m03AUGLqptlgtoiAuMTZtefBdggLuEp0fj3KCmLzCthLvO39zwxicwpYSRxt/cQMMfQ7o0TD
	pnNMIAl+AX2Jq38/MUEcaC8x88oZRohmQYkfk++BDWUW0JLYvK2JFcKWl9i85i3YUCEBdYkb
	d3ezT2AUnoWkZRaSlllIWhYwMq9iFE0tTS4oTkrPNdQrTswtLs1L10vOz93ECAnoLzsYFx+z
	OsQowMGoxMN7YmFVuBBrYllxZe4hRgkOZiURXtfb1eFCvCmJlVWpRfnxRaU5qcWHGKU5WJTE
	eefueh8iJJCeWJKanZpakFoEk2Xi4JRqYBRmiPtTP81d5Fa7wAHBx2qWP0sNd6U9UZCv3tXM
	lZb9U+isK/vC2zYXn12W///36sr/zJU7m+axqB9xtviizFkSljBJj2dHqK5zUtCe/B8W1ROV
	PzncPvN/Y3XKa6/F/967ct5kTfHMFvDImZ7UpbRD6/snByaJrrcXlCuUcqZe2hi9I/U8kxJL
	cUaioRZzUXEiAPKVeAhkAgAA
X-Seq: zsh-workers 38801

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

