Skip to content

fix(gesture): need more finger travel for the first words of a delete swipe - #951

Merged
LeanBitLab merged 1 commit into
mainfrom
feat/delete-swipe-curve
Nov 27, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
feat/delete-swipe-curve

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Addresses the second point of #773 (one quick swipe deletes several words).

Problem

With "Delete word by word", the delete swipe selected another word every 24 dp, so a short flick often deleted several words.

Changes

  • The first words need more finger travel and the steps get shorter after that: 24, 56, 44, 36, 30, 25, then 20 dp per word. A swipe under 80 dp selects one word.
  • Moving back 12 dp past the position that selected a word deselects it, which avoids flicker.
  • The curve is only for purely sideways swipes. Once a swipe selects a line, words move in even 24 dp steps measured from the finger, because the word count can restart there.
  • Character mode is unchanged. No new setting. Haptics are unchanged.

Trade-offs

  • Selecting two to four words takes more movement than before. A flick of 80 dp or more still deletes several words.

Testing

  • WordSwipeCurveTest, WordDeleteSwipeTest and InputLogicTest pass on current main (standard flavor, one test skipped), and the offline flavor compiles.
  • The finger movement handling in PointerTracker has no automated test.
  • The curve was tried on a phone. The last change (even steps after a line selection) has not been confirmed on a device.

… swipe

A word delete swipe selected another word every 24 dp, so a short flick
often deleted several words. The first words now need more travel and the
steps get shorter after that: 24, 56, 44, 36, 30, 25, then 20 dp. Moving
back 12 dp past the position that selected a word deselects it.

Only purely sideways swipes use this. Once a swipe selects a line, words
move in even steps again, because the word count restarts there.
@LeanBitLab
LeanBitLab merged commit d455095 into main Nov 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant