fix(ios): synced newline typing attributes with actual textStorage attributes - #775
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts iOS typing-attribute management so that moving the cursor onto an “empty line with newline” no longer unconditionally resets inline typing attributes when the newline already has valid inline styles applied.
Changes:
- Introduces a helper to restore inline style typing attributes present at a given range.
- When selection moves to an empty newline-only paragraph, restores inline styles present on that newline after resetting paragraph typing attributes.
- Refactors existing “extend typing attributes from previous character” logic to reuse the new helper.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
szydlovsky
reviewed
Aug 21, 2026
szydlovsky
approved these changes
Aug 24, 2026
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
Managing typing attributes was implemented in such way that when you moved the cursor to an empty line, the typing attributes got reset. This was to prevent picking up the style from the previous line, but it was done unconditionally. That caused the typingAttributes to be reset even though a style is already present in the newline and valid.
Test Plan
Experiment around, follow the test flow from the attached videos
Screenshots / Videos
Before:
Screen.Recording.2026-08-14.at.20.13.42.mov
After:
Screen.Recording.2026-08-14.at.20.18.55.mov
Compatibility
Checklist