Skip to content

v0.5.0

Choose a tag to compare

@roblillack roblillack released this 13 Jun 11:43
· 11 commits to main since this release

Added

  • Link editing: "Edit Link..." in the context menu (or Ctrl+K) opens a modal
    dialog with the link's visible text and target URL plus Open, Cancel, and
    Save buttons. With the cursor inside a link it edits that link; over a
    selection it turns the selected text into a link; otherwise it inserts a new
    one. Clearing the URL removes the link, leaving the text in place. Tab and
    Shift+Tab move between the fields and buttons, Space activates the focused
    button, and Enter always saves while Esc always cancels. The Open button
    launches the URL in the system browser (xdg-open/open/start). Links
    remain non-clickable in the editor itself, so a click only places the
    cursor — handy for editing a link in place.
  • Open... (Ctrl+O) and Save As... in the File menu. Both show a modal file
    dialog: a path input with shell-style Tab completion above a live listing
    of the directory it points into, navigable with the arrow keys (Enter
    descends into directories). Opening loads FTML or Markdown based on the
    extension and starts a new document for nonexistent paths; Save As writes
    in the format of the new extension, so saving a .md copy of an .ftml
    document converts it. Destructive accepts — opening over unsaved changes,
    overwriting another file — need a confirming second Enter. (#34)
  • New (Ctrl+N) in the File menu starts an untitled document, and Pure can
    now be started without a filename argument to do the same. Untitled
    documents show "Untitled" in the status bar, and saving one opens the
    Save As dialog to ask for a name first. With unsaved changes, New warns
    in the status line and only a repeated New discards them. (#34)
  • Clipboard support: Ctrl+X/Ctrl+C cut/copy the selection and Ctrl+V pastes,
    all also available in the Edit and context menus. Ctrl+C therefore no
    longer quits Pure; use Ctrl+Q for that. The internal clipboard keeps the selection
    as document structure, so pasting within Pure restores inline styles,
    paragraph types, and list structure. Copied text also reaches the system
    clipboard — as plain text, with blank lines between paragraphs — through
    the terminal with the OSC 52 escape sequence, and pasting from other
    applications works through the terminal's own paste shortcut (bracketed
    paste), arriving as a single undoable edit that turns blank lines back
    into paragraph breaks. (#33)
  • Inline styles now stack: applying a style to already-styled text layers it
    on top instead of replacing it, so e.g. bold and highlight combine and
    render together. Reveal codes show the nesting, and deleting a tag there
    removes just that style while the styles stacked inside it survive. (#32)
  • A menu bar in the typical TUI style: File, Edit, Format, and View menus
    across the top of the screen, opened with F10 or an Alt+letter accelerator
    and driven with the keyboard. (#29)
  • Basic undo/redo support (Ctrl+Z / Ctrl+Y). Consecutive typing, deleting, and
    backspacing coalesce into single undo steps. (#26)
  • An SVG snapshot testing harness: tests drive the real application headlessly
    through synthetic key and mouse events and snapshot the rendered terminal as
    deterministic SVG, so styling, selection, and cursor placement diff as text
    and open in any browser. (#27)
  • We're now automatically adding release notes using the CI. (#30)

Fixed

  • Applying an inline style to a selection no longer makes the cursor jump to
    the beginning of the selection; it stays at the position it had before. (#28)
  • With reveal codes shown, pressing Backspace directly behind a start tag like
    [Italic> removes the formatting again instead of merging the paragraph
    into the previous one, and the cursor stays at the position of the removed
    tag. The same root cause made Backspace at a style-span boundary merge
    paragraphs with reveal codes hidden, too. (#28)
  • Inserting or deleting a character in a line that shows reveal codes later in
    the line no longer hides those codes (while keeping the formatting) until
    the next full re-render. (#28)
  • Changing the indent level of paragraphs near nested lists no longer leaves
    behind empty list items that could not be removed. This covered several
    cases, including indenting the first item of a nested list, indenting a sole
    list item into a preceding quote, and unindenting the only child of a quote.
    (#35)
  • The Format menu's "Indent more" is now enabled only when indenting would
    actually do something, matching what the operation performs. (#35)
  • Unindenting a paragraph from the middle of a list now splits the list at that
    spot instead of dropping the paragraph below the entire list, where it
    appeared to vanish. (#35)
  • Splitting a list by unindenting now redraws the whole document immediately
    with the cursor in the right place, instead of leaving the view truncated and
    the cursor misplaced until moving away and back. (#35)
  • Pressing Backspace or Delete with an active selection now deletes the whole
    selection instead of just the single character next to the cursor. The
    word-wise variants (Ctrl/Alt+Backspace and Ctrl/Alt+Delete) do the same.
    (#37)

Misc

  • The README's demo GIF is now recorded automatically: examples/demo
    scripts a Pure session as a series of simulated key presses, renders every
    frame through the SVG snapshot harness, and assembles the result into
    demo.gif — so the demo can be re-recorded with one command whenever the
    interface changes. Without the recorder feature,
    cargo run --example demo plays the same script live in the terminal instead. (#31)