This patch provides a minimal solution to JDK-8393470 [TextInputControl] double 
click on leading char selects wrong word.
It simply checks if the caret is already at the start of a word and in that 
case it prevents the jumping to the start of the previous word.

It takes the one scenario from testDoubleClickSelectsCharacterClassBlocks that 
is fixed by the patch and moves it into a separate test method.

The other scenarios from testDoubleClickSelectsCharacterClassBlocks are 
removed, since they cannot be achieved without changing a lot of behavior and 
the current behavior while not being _my_ favorite way can be argued as 
"correct" in the absence of a formal specification.


---------
- [X] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8393470: Do not jump to previous word if already at start of word

Changes: https://git.openjdk.org/jfx/pull/2363/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2363&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8393470
  Stats: 59 lines in 2 files changed: 14 ins; 43 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/2363.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2363/head:pull/2363

PR: https://git.openjdk.org/jfx/pull/2363

Reply via email to