Repository navigation
scm.nvim v0.3.0
scm.nvim v0.3.0 shows a file's diff when you select it, and opens and updates the Panel much faster.
- Inline diffs: selecting a file shows its changes in the editor window: the whole file, removed lines in red above the added lines in green, the changed words marked more strongly, the new file's line numbers in the gutter, and an overview strip down the right edge. Changes compares the index with the file on disk, Staged Changes the last commit with the index, and Committed the branch's base with its last commit. A deleted file shows what was removed. (#18)
- The first screen does not wait on git: the start-up warm-up now collects committed history too, the first 100 rows are sent before the rest of a long list, and git is asked again only after the first screen is drawn. In a workspace of 11 repositories, the first rows reached Sprite in 8–17 ms where they took 113–136 ms. (#19)
- Only what changed is redrawn: unchanged rows are handed to Sprite as the same tables as last time, and an unchanged refresh sends nothing. A click that changes a few rows of a 2,050-row list is answered in about 6–9 ms where it took 10–18 ms. (#19)
- Faster scans: a repository's status and history are read side by side, and between four and eight repositories are scanned at once, by processor count. (#19)
Breaking: clicking a file, or pressing Enter on it, now shows its diff instead of opening it. Open the file itself with the row's hover button or the new o key. In keymaps, require("scm").act("open") shows the diff and act("file") opens the file.
Compatibility
The native dock needs Sprite 0.7.0 or later. The redraw speed-up needs Sprite 0.8.0 with sprite.nvim v0.7.0; with older versions every change sends the whole list, as before. After upgrading Sprite, run :Lazy update scm.nvim sprite.nvim and restart Neovim.
Validation
The headless test suite passed in CI on the tagged commit. Timings are when Sprite acknowledges the rows, not when pixels appear.
Compare: v0.2.0...v0.3.0