Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 14:01
· 16 commits to main since this release
Immutable release. Only release title and notes can be modified.
95c11b4

Fixes

  • A line is now as tall as the font it is set in. Line fragments took their height and baseline
    from the fonts CoreText actually drew with, and a text font has no emoji glyph, so CoreText
    substituted Apple Color Emoji — about 40% taller at the same point size. Typing an emoji grew its
    line by ~5.7pt at Menlo 12 and moved every baseline below it. The editor's font is now carried
    down to the typesetter and text fragments are sized from it; width, line breaking and hit testing
    still come from the real CTLine.
  • Find-and-replace carried its offsets in the wrong direction. Every match after a replacement
    moves by the difference between the replacement's length and the match's, and replaceMatch
    subtracted that difference instead of adding it: replacing "a" with "alpha" in "a one a" put the
    second replacement inside the first — "alalphaha one a". Replace-all's text was unaffected, since
    it works back to front, but its final cursor landed short by the accumulated difference.
  • CEUndoManager.disable() now actually suppresses recording. Only undo() and redo() checked
    the flag; registerMutation did not, so the edits setMarkedText and unmarkText wrap in it
    went onto the undo stack anyway. Composing a character rewrites the marked range on every
    keystroke, so each intermediate state became its own undo entry — undoing after composing
    Japanese or Chinese walked back through composition states the user never typed as such.

Changes

  • Removed 352 lines with no callers here or in Doop: TextView+EditorMenus.swift (unwired CodeEdit
    IDE menu stubs), TreeSitterClient+Temporary, NSRange+NSTextRange.swift, and a handful of
    single members. Two were public and leave the binary package's swiftinterface with the source:
    NSTextRange's init/nsRange pair and TextLayoutManager.visibleLines().

Tests

  • CEUndoManager's grouping heuristic, driven through TextView, including the explicit grouping
    Doop's find-and-replace leans on.
  • Replacing from the find panel, against a real TextViewController: each sign of the length
    change, adjacent matches, and replace-all as one undo group.
  • DeleteWhitespaceFilter and TabReplacementFilter, which run on every backspace and tab in an
    indented document and had no coverage.

CI

  • Cache SwiftPM's working copies, not just its mirrors, and prune the grammar submodules' example
    corpora before the cache is written — 6.0GB of the checkouts' 6.9GB that no target compiles.