Skip to main content

Module refresh

Module refresh 

Source
Expand description

MG.2: magit-status buffer refresh.

Runs git status, git stash list, and git log on spawn_blocking, formats the output through the section index, and applies it to the buffer via apply_edit_batch. No diff commands — diffs load on demand via =.

Functions§

apply_and_highlight
Apply a full buffer replacement, then store highlights and fire the waker so the Editor repaints immediately. Async — call from a tokio task (NOT spawn_blocking). The blocking I/O phase (build_and_format) must complete before calling this.
apply_and_highlight_refined
DR.3: as apply_and_highlight, publishing intra-line refinement with the spans — one update, so the two cannot drift when an inline expansion shifts lines.
build_and_format
Build the status buffer text (+ styled spans + MG.14 header fields) from live git data. Blocking — call on spawn_blocking.