Port upstream list paste ordering fix#65
Open
Renakoni wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream Source
Android Relevance
This affects Android's live Muya editor paste behavior. Before this fix,
tryMergeListPaste()rebuilt the enclosing list by appending pasted items to the end of the list, even when the cursor was in a middle item. Pasting- Item 1 / - Item 2 / - Item 3into an empty middle item betweenItem AandItem Bcould produceA, Item 1, B, Item 2, Item 3instead of keeping the pasted sequence together.Change Details
seatListMergeCursor()so the caret lands on the folded paragraph, trailing pasted states, or the last pasted list item as appropriate.Verification
pnpm --dir third_party/muya exec vitest run src/clipboard/__tests__/pasteListMerge.spec.tspassed.pnpm buildpassed.pnpm --dir third_party/muya exec vitest run src/clipboard/__tests__was also run; it has one pre-existing unrelated failure incutSelectionToClipboardData.spec.tswherecutSelectionToClipboardDatadoes not deletealphafromalpha beta. The touched paste-list spec passes independently.