linebender / linebender/parley

Ligatures at the start of words break word selection

Open
#336 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
736
Forks
120
Avg merge
1d 3h
Merged PRs (30d)
53

Description

Hi y'all.

I was trying out the example vello_editor and noticed some strange behavior: Most words are selected correctly on double-click, except the word `finibus`. In that case on double-click did not include the first letter of the word.

### How to reproduce:

* write `finibus` into the editor. alternatively `fixxxx` or `flxxxxx`
* try selecting the text with a double-click

### Here is what I have discovered so far:

* It's only a problem with that word, I tried selecting all other words in the example and it works fine.
* The problem is reproducible by typing finibus into another part of the editor and trying to select it again
* It seems to be a problem with the character sequence `fi` specifically, but I also noticed it on `fl` while testing
* This seems to only happen if the word **starts** with the characters, not if it's appears in or at the end of the word.
* The behavior does not appear with `Fi`
* Double-clicking on the `f` only selects that character

### Tested with:

* Fedora 41, last updated on 2024-04-13
* Rust 1.86.0, both in debug and on release
* commit: d53a05820799a88b23a9712d9d026378a2699403

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the selection problem in the vello_editor example with words beginning with `fi` or `fl`, using the reported commit as a reference point. Trace how double-click word selection handles ligature-shaped character sequences, and consider the issue done when the initial character is included without breaking selection for other words or uppercase `Fi`.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.