Skip to content

Save YOffset between files, keep a global YOffset position _per file_ for the preview panel.#451

Closed
abourget wants to merge 2 commits intoidursun:mainfrom
abourget:feature/fix-offset-jumping-around
Closed

Save YOffset between files, keep a global YOffset position _per file_ for the preview panel.#451
abourget wants to merge 2 commits intoidursun:mainfrom
abourget:feature/fix-offset-jumping-around

Conversation

@abourget
Copy link
Copy Markdown
Contributor

@abourget abourget commented Dec 31, 2025

Before this, the YOffset of the preview pane would jump, because it would keep the memory of the previous offset, whatever the file was there previously.
Now if you're inspecting a patch at a given offset, it'll keep it.

A prior implementation used the change_id in the key, to keep persistence across commits, might be a good idea to bring back.

Using a global, it allows to keep the memory even if you go back and forth other revisions. Would leak minimal memory here, perhaps could implement some sort of TTL with that memory.


Whoops, this brings another PR I had done. Please review only the last commit here!

Revert configurable option for search highlight.
Using lipgloss.Render emitted a styles reset, so we lost the styling that was there before, like background and color.
Most diff tools don't tweak boldness, so we should be better off here.

Hmm, underline would be better?
@abourget abourget requested a review from idursun as a code owner December 31, 2025 06:55
@idursun
Copy link
Copy Markdown
Owner

idursun commented Mar 13, 2026

closing due to conflicts

@idursun idursun closed this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants