appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#3
Merged
Conversation
Enable eframe's persistence feature and persist ONLY the diff-panel splitter height (~/.local/share/gitkay/app.ron) via App::save / cc.storage: persist_egui_memory() returns false, so the whole egui-memory blob (which would also restore every ScrollArea offset) is not saved; the height is captured from the panel response each frame and re-applied as default_height on startup. Window geometry is deliberately not persisted (persist_window = false): eframe's window-size round-trip grows the window on every Wayland restart (fractional scaling + client-side decorations).
Replace the content-computed sidebar width with an egui SidePanel::right so the divider between the diff and the file list is a draggable splitter. Its width is persisted across runs like the diff-panel height: read from cc.storage into default_width in new(), captured from the panel response each frame, and written under "file_list_width" in App::save. The sidebar still only appears when the selected commit touches files.
Up/Down move the selection to the previous/next commit (loading its diff) when the search bar isn't focused. graph_scroll_to now carries a scroll alignment so clicks and search jumps still center the target, while arrow navigation scrolls minimally — only when the selection would leave the viewport.
When the search bar is focused, Up/Down step backward/forward through the matches (wrapping), mirroring Enter's forward cycling. Outside the search bar they still move the commit-list selection.
A toolbar revealed on hover at the top of the diff panel adds a context-lines stepper (0-99, default 3) and an 'Ignore whitespace' (-w) checkbox. It's a floating overlay (egui Area), so it never takes vertical space from the diff. The settings flow through a DiffSettings struct into all three diff paths (commit, uncommitted, staged), persist across runs via App::save, and re-run the current diff immediately when changed. Settings are read before the startup diff so persisted values apply on launch.
Owner
|
Thank you for the contribution! These are pretty cool features and fixes!
Oh, very nice! Happy to read that it has value for others :) |
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.
Take 2: Some gitk features I was missing
Entirely written by claude & tested by me, feel free to instantly deny or requests changes
These are the initial smaller changes I made, that should be fairly safe.
After that I made some more invasive changes, but I am not sure what you vision for this project is, and if these would be welcome, they are also all written by claude, I use gitkay daily now at work, and so far not had any issues.
Changes includes:
There is an overview here: https://github.com/selckin/gitkay/blob/master/OVERVIEW.md
I can try to make individual PR per features that are reviewable if you wish, or maybe just a giant PR with everything, or just keep them in my fork
Cheers