tinyedit v0.3.6 — Safer saving, more reliable editing, and faster redraws
This release improves document safety, Unicode editing, search, and responsiveness
on larger files. It remains a plain C/POSIX terminal editor with no new external
dependencies.
These notes cover the cumulative changes from v0.3.3 to v0.3.6, including
features shipped in v0.3.4 and the strict UTF-8 improvements from the v0.3.5 tag,
which had no separate GitHub release. The fixes and performance improvements
below complete that upgrade path.
New since v0.3.3: menus, terminal behavior, and editing features
The following features were introduced in v0.3.4 and are included in v0.3.6:
- Persistent TinyEdit, File, Edit, View, and Help menus, accessible through F10
or the mouse. - View-menu switches for line numbers, the top bar, the menu bar, invisible
characters, syntax highlighting, and automatic indentation of new lines. - Matching-bracket highlighting for existing and pasted text, not only pairs
inserted automatically. - Automatic closing tags for XML/HTML, leaving the cursor between the tags;
self-closing tags and HTML void elements are handled appropriately. - A configurable cursor scroll margin that keeps surrounding text visible
while navigating. - Alternate-screen support: exiting restores the shell prompt and scrollback.
Cleanup also restores raw mode, mouse reporting, bracketed paste, keyboard
protocol state, and cursor appearance. - Improved mouse menu navigation and hover selection, restored click reporting
after menus close, and corrected background restoration below the menu bar. - Ghostty input fixes for Command shortcuts (including select all), Shift-click
selection, and Shift-Tab handling. Command-key integration remains optional
and experimental. - Fixed path-resolution buffer overflows when identifying files and backups.
Safer opening and saving
- Failed loads preserve the current document instead of leaving partially loaded text.
- Saves use atomic file replacement and check file and directory synchronization.
If durability cannot be confirmed, tinyedit reports the problem and retains its
modified state and recovery copies. - Save as adopts the new filename only after a confirmed successful save.
- Open and Save as accept home-relative paths such as
~/tmp/notes.md. - Settings and recovery writes use the shared persistence helpers, with improved
handling of read, write, close, and path-resolution errors.
More reliable editing and navigation
- Fixed Page Up/Page Down crashes on empty documents and upward movement at the
beginning of a file. - Fixed prompt-buffer growth for long typed or pasted filenames and search queries,
and clipping of long filenames in the top bar. - Fixed wrapping in very narrow viewports and tab alignment after Unicode text.
- Backspace deletes a whole UTF-8 grapheme in one operation, including composed emoji.
- Pair insertion, selection wrapping, indentation, and compound replacements have
explicit undo boundaries. Undoing an automatically inserted pair preserves the
text typed before it. - Fixed selection replacement when auto-close options are disabled.
- Mouse bursts preserve the next keyboard event; drag state is cleared across
document changes and mouse menu actions follow the same command routing as keys.
Markdown, search, and Unicode
- Markdown math blocks delimited by
$or$$on dedicated lines are highlighted
completely, including delimiters and content across blank lines. Only a matching
delimiter closes the block; fenced code remains code. - Regex navigation reuses compiled expressions and multiline search text, refreshing
the text cache after edits and undo/redo. - Improved backward regex matching and fixed multiline anchors after newlines and
zero-width searches beyond the document end. - Strict bounded UTF-8 decoding rejects malformed sequences without reading past
buffers. Editing and rendering preserve the original malformed bytes for saving. - Added a shipped JSON syntax configuration, installable with
make install-syntax.
Faster redraws and better verification
- Wrapped rendering locates the first visible segment once, then draws sequentially.
- Character counts and matching-bracket results are cached and invalidated when
their inputs change; frame output buffers grow geometrically. - In a local CPU-only benchmark with 50,000 rows, row drawing dropped from about
6.09 ms to 0.10 ms. This measures frame construction, not terminal I/O; results
depend on the machine and document. - Expanded core, pseudo-terminal, persistence fault-injection, search, and rendering
regression coverage, plus a reproduciblemake benchmarktarget. - Updated module documentation; benchmark methodology and remaining limits are
documented intests/README.mdon the current development branch.
Upgrade and known limits
Build with make. Install the supplied syntax definitions separately with
make install-syntax; existing user definitions are preserved. Restart a running
editor to use the new binary.
Undo still stores complete document snapshots. Large files combined with a deep
history can use substantial memory; the default history depth is 200. Some
position conversions and the first matching-bracket scan remain linear in document
size. Saving a mixed-line-ending file uses one document-wide ending style rather
than preserving each original row's terminator individually.
Full changes since v0.3.3:
v0.3.3...v0.3.6
Changes since the previous published release (v0.3.4):
v0.3.4...v0.3.6
Changes since the v0.3.5 tag:
v0.3.5...v0.3.6