fix: use cache key for side-by-side toggle instead of clearing cache#77
Merged
dlvhdr merged 5 commits intodlvhdr:mainfrom Feb 6, 2026
Merged
fix: use cache key for side-by-side toggle instead of clearing cache#77dlvhdr merged 5 commits intodlvhdr:mainfrom
dlvhdr merged 5 commits intodlvhdr:mainfrom
Conversation
When toggling side-by-side, cache both renders under separate keys (path vs path:sbs) so switching modes is instant after the first render.
The cached diffs are rendered at a specific width, so they must be discarded when the terminal is resized.
Remove stale sideBySidePreference reference, vpHeight() call, and redundant cache clearing in SetSideBySide that was defeating the cache key approach.
dlvhdr
approved these changes
Feb 6, 2026
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 9, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [dlvhdr/diffnav](https://github.com/dlvhdr/diffnav) | minor | `v0.8.1` → `v0.9.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>dlvhdr/diffnav (dlvhdr/diffnav)</summary> ### [`v0.9.0`](https://github.com/dlvhdr/diffnav/releases/tag/v0.9.0) [Compare Source](dlvhdr/diffnav@v0.8.2...v0.9.0) #### Changelog - [`3da3297`](dlvhdr/diffnav@3da3297) feat: floating help menu ([#​85](dlvhdr/diffnav#85)) ### [`v0.8.2`](https://github.com/dlvhdr/diffnav/releases/tag/v0.8.2) [Compare Source](dlvhdr/diffnav@v0.8.1...v0.8.2) #### Changelog - [`e95cea2`](dlvhdr/diffnav@e95cea2) fix: only log errors to stderr if not debug mode ([#​84](dlvhdr/diffnav#84)) - [`89fce8d`](dlvhdr/diffnav@89fce8d) fix: use cache key for side-by-side toggle instead of clearing cache ([#​77](dlvhdr/diffnav#77)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Ni4wIiwidXBkYXRlZEluVmVyIjoiNDIuOTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #75 — implements the cache key approach as suggested.
pathvspath:sbs) so both renders are cached separately — toggling withsis instant after the first renderTest plan
son a file, verify it re-renders