The mouse-event struct was already in cl-tty.input. All mouse handling
logic (mouse-mixin, hit-test, selection, clipboard, link detection)
was in a separate cl-tty.mouse package. Moved everything into the
input package where the struct lives, eliminating one package boundary.
Changes:
- absorb mouse-mixin, handle-mouse-event, hit-test, selection struct,
selection variables/functions, cell-link-at, open-link-at into
text-input.org (tangled to input.lisp)
- update cl-tty.input defpackage with mouse exports
- mouse tests merged into INPUT-SUITE (appended to input-tests.lisp)
- delete mouse.org, mouse-package.lisp, mouse.lisp, mouse-tests.lisp
- update ASDF, run-all-tests.lisp, scripts to drop mouse references
All test suites pass at 100% (INPUT-SUITE: 102 tests, +6 from mouse)
The select widget (filtered option list) was only used by the dialog
system. Merging removes an entire package boundary, simplifies the
dependency chain, and reduces the library from 12 packages to 11.
Changes:
- absorb select class, accessors, filter, navigation, key handling,
rendering, fuzzy matching, and all tests into dialog.org
- update cl-tty.dialog package to use cl-tty.box (for dirty-mixin)
and cl-tty.layout (for layout-node)
- remove select.org, select-package.lisp, select.lisp, select-tests
- update ASDF, run-all-tests.lisp, scripts to drop select references
- update integration tests to use cl-tty.dialog instead of cl-tty.select
All 13 test suites pass at 100%.
Bug fixes:
- Fix OSC8 format strings (backslash escape layering) in modern-backend.org
- Test format string had single backslash instead of double, causing
unclosed CL string that cascaded through 3 subsequent test forms
- Implementation format string had leading escaped quote (not a string
opener) and triple-backslash ending (also not a string terminator)
- Fix missing closing parens in border-char-rounded and border-char-double tests
- Fix ASDF input-tests pathname (file lives in tests/, not src/components/)
New features:
- Implement suspend-backend / resume-backend protocol methods
- modern-backend: exit/enter alt screen, re-enable mouse/kitty/bracketed-paste
- simple-backend: no-ops (no terminal state to preserve)
Infrastructure:
- Update test suite to cover suspend/resume (backend + modern-backend suites)
- 454 checks, 100% pass across 14 test suites
CRITICAL: case b → cond in %read-event (input.lisp:280)
case with (and ...) predicate clauses treats keys as eql-compared
atoms — all range clauses were dead code. Every Ctrl+letter and
printable ASCII fell through to :unknown. text-input/textarea
widgets were non-functional with real terminal input. No test
coverage of %read-event masked this.
HIGH: Theme resolution wired (backend/modern.lisp, theme.lisp)
sgr-fg/sgr-bg now fall back to *theme-colors* hash for semantic
keywords (:accent, :text-muted, :background-element). *theme-colors*
exported from cl-tty.backend. load-preset populates it from preset
hex values. Previously all themed render output was invisible.
HIGH: SGR mouse parser wired (input.lisp:210-215)
parse-sgr-mouse was defined but never called. Now %read-escape-sequence
detects ESC[< prefix and routes to parse-sgr-mouse. Mouse drags,
releases, and scroll events now parse correctly.
MEDIUM: Rendering stubs replaced
- scrollbox: delegates to (render child backend) with position
offset via unwind-protect (was debug string 'child at ~D')
- text-input: draws value/placeholder at layout position
- textarea: draws visible lines at layout position
MEDIUM: hit-test uses component-layout-node (mouse.lisp:18-31)
Was checking nonexistent x/y/width/height slots. Now reads
layout-node-x/y/w/h via component-layout-node generic.
MEDIUM: test runner exit code (run-all-tests.lisp, cl-tty.asd)
run-all-tests.lisp exits 1 if any suite fails.
asdf:test-system exits 1 on failure.
Renamed :cl-tty-tests to :cl-tty/test (ASDF convention).
MEDIUM: draw-border respects x/y on simple-backend (simple.lisp:42-53)
Was writing to cursor position only. Now uses newlines+spaces
to reach specified coordinates (no escape sequences needed).
LOW: TabBar truncation off-by-one fixed (tabbar.lisp:47)
>= changed to > to avoid cutting tabs 2 chars early.
LOW: Scrollbar coordinates absolute (scrollbox.lisp:61-73)
Scrollbar drawn at viewport-relative (0,0). Now adds layout
node x/y offset for correct terminal positioning.
LOW: backend-write calls finish-output (modern.lisp:169)
LOW: load-preset no longer flips theme-mode (theme.lisp:43-45)
Mode toggle caused load-preset to load wrong variant on
second call.
All backported to org source files (org/text-input.org,
org/scrollbox-tabbar.org) so tangling produces matching .lisp.
392 tests pass, exit code 0.
New module: src/rendering/framebuffer.lisp (tangled from org/framebuffer.org)
- framebuffer-backend class: implements backend protocol by writing to
2D cell array instead of emitting escape sequences
- cell struct: per-cell state (char, fg, bg, bold, italic, underline, link-url)
- make-framebuffer / framebuffer-width / framebuffer-height
- draw-text, draw-rect, draw-border, draw-link, draw-ellipsis methods
- diff-framebuffers: compares two framebuffers, returns changed cells
- flush-framebuffer: diff + output changes to real backend
- with-scissor macro: clip drawing operations to rectangle
- cursor-move: added default no-op method for all backends
- 20 new tests, all passing (372 total)
Version bumped from 0.11.0 to 0.13.0.
License field set to GPL-3.0 in ASDF.
Root cause: normalize-box and slot :initforms used quoted literal
lists ('(...)) that were destructively modified by (setf (getf ...)).
Each call to normalize-box with a non-nil spec corrupted the shared
default list, causing all subsequent nodes with no explicit padding
to inherit the previous node's padding values.
Fix: replace all '(...) quoted literals with (list ...) constructor
calls — in normalize-box (3 paths) and in slot initforms for both
padding and margin.
All 11 test suites now pass: 358/358 checks, 0 failures.
- defslot: register render functions into named slots with ordering
- slot-render: call all registered render-fns for a slot
- Slot modes designed (stack/replace/single-winner) but mode dispatch
is implicit via the registration API
- slot-p, clear-slot, list-slots for lifecycle management
- Slots stored in a hash table keyed by string (equal test)
- 4 tests, 100% passing
- mouse-mixin class with on-mouse-down/up/move/scroll handler slots
- handle-mouse-event dispatches to the right handler by event type
- hit-test finds deepest component at (x,y) coordinates
- selection struct + get-selection + copy-to-clipboard
- SGR mouse parsing already existed in input system (mouse-event struct,
parse-sgr-mouse function, CSI dispatch in %read-escape-sequence)
- 3 tests, 100% passing