Skip to content

Add delete word forward - #4

Merged
trueadm merged 5 commits into
mainfrom
delete-word-forward
Jan 19, 2021
Merged

trueadm merged 5 commits into
mainfrom
delete-word-forward

Conversation

@feedthejim

Copy link
Copy Markdown

Mostly the same as deleteWordBackward with a slightly different logic

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 18, 2021
@feedthejim
feedthejim requested a review from trueadm January 18, 2021 15:34

@trueadm trueadm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trueadm
trueadm merged commit fd5dc0f into main Jan 19, 2021
@trueadm
trueadm deleted the delete-word-forward branch January 19, 2021 10:29
let foundNonWhitespace = false;
for (let s = startIndex; s < textContent.length; s++) {
const char = textContent[s];
if (char === ' ') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to match on other kinds of whitespace (eg. em spaces, en spaces, maybe tabs – although I haven't thought about that one yet).

Filed #9.

acywatson pushed a commit that referenced this pull request Apr 9, 2022
zurfyx pushed a commit that referenced this pull request Jul 26, 2022
zurfyx added a commit that referenced this pull request Oct 30, 2026
## Description

`KNOWN_OPEN` said seed 1045 loses text typed into a table a peer removes. Minimized, the seed is two operations: one client makes the paragraph inside a box a check list, which replaces the box with the list, while another inserts a table into that box. The table goes with the box (delete wins), which the Yjs 13 layouts lose too. The comment now says that. Comments only.

## Test plan

### Before

```
$ FUZZ_SEED=1045 pnpm exec vitest run --project unit packages/lexical-y/src/__tests__/unit/Fuzz.test.ts
[r0] C2 #4 list check paragraph("<0.14>")
[r0] A1 #6 table table(tablerow(tablecell(paragraph("<6.0>")) tablecell(paragraph("<6.1>"))) tabl in test_box
loss?: <6.0>[line,op6],<6.1>[line,op6],<6.2>[line,op6],<6.3>[line,op6]
```

(the minimized script, from the fuzz utilities' `minimize`)

### After

```
$ pnpm exec vitest run --project unit packages/lexical-y/src/__tests__/unit/Fuzz.test.ts
 Test Files  1 passed (1)
      Tests  16 passed (16)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants