Skip to content

v0.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 20:52

Added

  • Configuration file — an optional TOML config at ~/.config/pure/config.toml
    (honoring XDG_CONFIG_HOME); a missing, unreadable, or invalid file falls back
    to defaults. First setting: caret_affinity (default true) — an extra caret
    stop at inline-style/link boundaries that controls whether text you type there
    joins the run; set false to step across such boundaries in a single press. (#40)

  • Block model for containers (quotes and lists): Wrap inside… (Esc .)
    wraps the paragraph or selection in a new container (Quote, Numbered/Bullet
    List, Checklist) while preserving the inner paragraph types; Select parent
    (Esc ,) targets the enclosing container to convert it, unwrap it, or climb a
    level. [ / Shift+Tab now also lifts a paragraph out of a quote, not just a list. (#40)

  • Horizontal rules — a thematic break, via Insert > Horizontal Rule. A
    rule always sits at the top level: inserting one mid-paragraph splits the
    paragraph around it, and from inside a list or quote it lands below that whole
    block. The caret continues below the rule. Backspace and Delete remove it, on
    the rule itself and from the edge of the block above or below. A rule holds no
    text, so the context menu's paragraph types are disabled while the caret rests
    on one, and the status bar names it "Horizontal Rule". The terminal draws
    tdoc's centered ───── • ───── ornament, since a cell grid cannot draw a
    sub-cell line. (#42)

  • Definition lists — terms paired with their definitions, via the context
    menu's Definition List entry below Checklist (no number shortcut: 0–9
    are all taken). Terms render bold and definitions indent beneath them; a
    definition holds whole paragraphs, so anything can go inside one. Round-trips
    through HTML (<dl>/<dt>/<dd>) and Markdown.

    Enter alternates between the two halves, so a glossary is typed straight
    through: at the end of a term it opens the definition, at the end of a
    definition it starts the next term, and on an empty term it leaves the list.
    Ctrl+P adds another paragraph to the current definition, as it does inside
    a list item. Tab folds a term, with its definition, into the definition
    above; Shift+Tab turns a definition into the next term, taking the
    paragraphs below it along. The two are exact opposites.

    Picking any other paragraph type lifts that line out of the list instead
    of converting the list in place: a definition leaves as a new paragraph below
    the list (its term keeps an empty definition), and a term takes its definition
    along only when no other term is left to head it. The rest stays a list, and
    lists split and rejoin as lines leave and return, so a round trip through
    another type never leaves a seam. Picking Definition List again dissolves
    the whole list. Previously a term ignored the menu and a definition changed
    type in place.

    Known limitation: formats without these elements degrade them on save.
    FTML drops a rule and flattens a definition list into plain paragraphs;
    Gemtext writes a --- line and plain text instead. The text survives, the
    structure does not, and Pure does not warn about this yet. .html and .md
    keep both. (#42)

Changed

  • Unknown or missing file extensions are refused instead of being treated as
    FTML. Opening or saving such a file (e.g. README, notes.txt) now reports an
    error naming the supported extensions (.ftml, .md, .html, .gmi). (#46)
  • Editor/layout engine carved out to the shared rutle crate, replacing
    Pure's homegrown layouter. Pure and its sibling editor Piki now share one
    structured-editor/layout core, and both resolve the same tdoc so
    tdoc::Document crosses the crate boundary unchanged. Retires ~26,000 lines
    (src/editor/, editor_display.rs, render.rs, and their tests), replaced by
    a thin ratatui adapter (ratatui_draw_context.rs). Rendering, cursor movement,
    selection, reveal codes, and tables are at visual parity; SVG snapshots updated.
    (#40)
  • Cursor navigation and redraw are much faster — ~2.3–2.9× per keystroke
    versus the old layouter (e.g. USER-GUIDE.md: 1.76 vs. 5.09 ms/key). Two
    follow-ups — making resize()/padding updates idempotent so an unchanged frame
    keeps the layout cache, and memoizing the status-bar word count — bring every
    tested case under 300 µs/key (down from up to ~1.95 ms). Measured by the new
    end-to-end examples/bench_cursor.rs. (#40)
  • tdoc bumped to 0.12 and rutle to 0.6.0 for
    Paragraph::HorizontalRule and Paragraph::DefinitionList. rutle now draws
    reveal-codes tags as WordPerfect-style boxes in pixel backends; the terminal
    keeps the bracketed [Bold> / <Bold] text tags, so nothing changes on
    screen. (#42)
  • The status bar now advertises the formatting menu as Esc:Format, ahead
    of F10:Menu ^S:Save ^Q:Quit; on a narrow terminal it is the first hint to
    go. The popup's title is now Format (was "Context Menu"), matching the
    Format drop-down. (#43)

Fixed

  • The Windows release binaries now statically link the MSVC C runtime, so they
    no longer need VCRUNTIME140.dll (the Visual C++ Redistributable) to be
    installed. (#45)
  • The status bar's word count now reaches into every place a paragraph can
    hold text. It previously stopped at one level of checklist nesting and skipped
    tables entirely, so table cells counted as zero words. Definition-list
    terms and definitions are counted too, at any nesting. (#42)
  • The status bar's line count accounts for the blank rows a horizontal rule
    reserves, keeping its line numbers in step with what the engine laid out. (#42)
  • The format round-trip tests used one fixed temp path per extension, so two
    tests saving the same extension could race. Each call now gets its own file. (#42)
  • Converting a paragraph to a quote (Esc 5) now converts it (a heading
    becomes a plain quote) instead of nesting it, matching lists. A single-text
    container acts as a leaf, so Esc 5/8/0 round-trip and the breadcrumb shows
    the effective type. Converting to a list merges with an adjacent same-kind list. (#40)
  • Changing list type over a selection spanning two or more items carves just
    those items out into a new list (splitting the original) instead of converting
    the whole list; a plain cursor still converts the whole list. (#40)
  • Ctrl+P now inserts a continuation paragraph in the current item instead of
    starting a new item. (#40)
  • Enter on an empty nested line no longer dissolves the item: an empty trailing
    line becomes a new empty item, and repeated Enter steps out one level at a time
    (out of the list, then out of an enclosing quote). An empty line in a quote exits
    the quote instead of adding another blank quoted line. (#40)
  • Shift+Enter / Ctrl+Enter insert a hard line break again — Pure enables
    the terminal's keyboard-enhancement protocol where available (Ctrl+J remains a
    fallback). (#40)
  • Nested list items now use proper per-level indentation in the terminal
    (previously collapsed to a flat indent). (#40)
  • List content (continuation paragraphs, code blocks) aligns with the item's text
    rather than a fixed bullet width — fixing misindented continuations and
    inconsistent number padding in two-digit numbered lists. (#40)
  • Tab / Esc ] on a paragraph that follows a container now nests it into
    that container (list item, checklist item, or quote child) instead of inserting
    spaces — including inside a quote, for multi-paragraph selections, and for
    paragraphs before a list (prepended); a paragraph between two same-kind lists
    is merged into one. (#40)
  • Tab on the first item of a list directly after a quote pulls it into the
    quote as a nested list (bullet/number preserved), removing the emptied outer
    list; Shift+Tab on a list item inside a quote reverses this, lifting it out
    while keeping it a list item. (Enter on an empty item, and toggling a list off,
    still produce a plain paragraph.) (#40)
  • Indenting a list item under a sibling that already has a sublist merges into it
    even across kinds; the first item of a list following another list can Tab
    straight into that list; checklist items after a bullet/numbered list nest as a
    sub-checklist (checkboxes kept), and Shift+Tab lifts them back to a
    top-level checklist rather than to text. (#40)

Removed

  • Tab no longer inserts whitespace as a fallback — it is dedicated to structure
    (indent / Shift+Tab unindent) and does nothing when there is nothing to indent. (#40)

Misc

  • Replaced the Criterion micro-benchmark harness (benches/performance) with
    examples/bench_cursor.rs, which drives the public App API over a headless
    TestBackend — so it also builds on the pre-rutle codebase for head-to-head
    comparison in a git worktree. (#40)