Repository navigation
libghostty v0.0.13
·
12 commits
to main
since this release
Breaking
- Paste requests:
Terminal.pasteacceptsPasteRequestand returns
whether output was written. Replace string arguments with
PasteRequest.text, moveallowUnsafeonto the request, and use
PasteRequest.mimefor clipboard source, location, ordered MIME preferences,
and lazy readers. - Typed public values: clipboard payloads, terminal geometry, decoded
images, and X11 colors use immutable classes. Replace record literals with
the corresponding class constructors and use named fields. - Cursor types:
CursorbecomesRenderStateCursor. Replaceposition
andshapewithviewportX,viewportY, andvisualStyle. Check
viewportHasValuebefore using viewport coordinates. Terminal cursor
configuration usesTerminalCursorShape. - Kitty graphics types:
PlacementandRenderInfobecome
KittyPlacementandKittyPlacementRenderInfo. ReplaceKittyImage.pixelData
withcopyPixelDataInto()to copy pixels into caller-owned storage. - Selection gesture options:
SelectionGestureEventOptionis no longer
exported. ReplaceSelectionGestureEvent.clear(option)with nullable setters
such assetRef(null)andsetWordBoundaryCodepoints(null). Use
clearPosition()for pointer position. - Listenable: the exported
Listenablenow comes frompackage:listen.
Implement its listener contract or useChangeNotifierfrom that package
instead of mixing in the former libghosttyListenable. - Exception constructors: pass messages and operation context through the
namedmessageandoperationarguments.
Added
- Terminal snapshots:
Terminal.encodeSnapshot()andSnapshotDecoder
capture and restore state synchronously or incrementally on native and WASM
targets. Continuation tracking preserves incomplete VT and UTF-8 input;
restoration can compress scrollback as it loads. - Terminal search:
Searchsupports incremental matching, match navigation,
viewport results, and configurable scrolling to the selected match. - Clipboard reads:
Terminal.onClipboardReadhandles terminal clipboard
requests with MIME-aware replies. Clipboard reads remain opt-in. - Session events: callbacks report desktop notifications, progress, program
status, semantic prompts, full resets, and synchronized-output holds. - Parsing controls:
writeUntilGround(),isVtGround,isCursorAtPrompt,
continuation, andwriteContinuation()support parser-boundary handling
and continuation capture. - Unknown sequences:
unknownSequenceMaxBytesandonUnknownSequence
expose bounded, binary-safe unsupported sequences.OscParseralso exposes
captured unknown content, truncation, and terminator metadata. - Resource limits: applications can bound scrollback by bytes or rows and
limit clipboard-write payloads. - Terminal compatibility: configure cursor and terminal-mode defaults,
choose whether resizing restores scrollback rows, set the terminfo name,
and opt into screen checksum replies. - Terminal metadata: memory usage, pixel dimensions, mouse shape, cursor
visibility and pending wrap, and default colors are available to callers.
Title and working-directory values can also be set directly. - Incremental rendering:
RowIterator.nextDirty()lets renderers visit
changed rows without scanning the entire viewport. - Offscreen rendering: renderers can request rows above and below the
viewport withRenderState.overscanRequest. Row identities and viewport
coordinates let renderers reuse cached rows across updates. - Prompt navigation:
Terminal.scrollToPrompt()scrolls between shell
prompts reported through shell integration. - System callbacks: secure random sources are configurable through
LibGhostty.setRandomSecure()andclearRandomSecure().
Changed
- Error details: typed exceptions include result codes and operation
context.UnknownResultExceptionpreserves unrecognized result codes, and
callback failures retain their original errors and stack traces.
Fixed
- Kitty graphics: cropped images render at the correct size when the
requested source rectangle extends beyond the image bounds. - Resource lifetime: accessing invalidated borrowed views throws
StateError. Callbacks no longer keep otherwise unreachable terminals alive,
and failed WASM resource creation no longer leaks memory. - Key event text: key events remain usable after setting their text fails
because of insufficient memory. - Parser inputs: invalid SGR parameters are rejected, and OSC parsing
preserves binary byte containers across native and WASM targets. - Source builds: rebuilt applications use the refreshed native library.
Compiled binaries no longer require the build machine's CPU instruction set,
and iOS builds respect the configured deployment target.