smelt.diff¶
Tier: Host - Available in every runtime, including headless mode.
Classification: Advanced - Documented low-level capability for plugins that need full control. It may evolve more freely than the Supported facade.
Compact unified-patch indexing, metadata and expandable context folds. Rendering cost is proportional to the viewport, not patch length.
smelt.diff.parse¶
Types: smelt.diff.Diff
Index Git patch rows and folds without tokenizing source. context defaults to 3 visible lines at each edge of an unchanged run. Row indexing is linear and synchronous; use smelt.git.diff for asynchronous repository acquisition. Syntax and inline highlights are computed on demand in a background worker with bounded caches and old/new parser checkpoints. Each visible window submits its own demand; copying and searching only read cached results. Inline results publish before distant syntax seeks; large replacement blocks compare only viewport pairs. The first 128-256 rows of the previous and next file are prefetched after visible work, without keeping the UI repainting. Text and navigation are immediately available; highlights appear when ready without blocking a frame.