-
-
Notifications
You must be signed in to change notification settings - Fork 2k
How to enable pager while interactive staging #2117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Facing the same issue. @jesseduffield Is the below given function causing this behavior? Not sure if this kind of interactive staging is even possible using delta. lazygit/pkg/commands/git_commands/working_tree.go Lines 295 to 314 in ef82f39
|
Facing a similar issue when trying to scroll the diffs of a file with the 'j' and 'k' keys. When I'm just using the files section to browse I can see the delta diff view as expected. Yet when I hit enter the delta pager view is replaced with the default giff pager view. Also when I just git diff on the command line I can scroll up and down the delta pager view as expected. I'm wondering if this has to do with delta using less for presentation somehow. |
There's two things to discuss here. The first is that we do not support using arbitrary pagers in our staging mode. The second is that we don't allow focusing the main panel for a file without switching to staging mode. If we added the ability to focus the main panel for a file without switching the staging mode, that would allow you to easily scroll through the delta diff. This would be a much easier change than supporting the delta diff when you're actually staging a file line-by-line. At any rate at the moment you can still scroll the main panel using pgup/pgdown |
it looks like there is a similar or related issue: #1939 |
@jesseduffield Hi, just ran into this after starting to use the awesomness that is lazygit and wanted to let you know that delta pager in particular has an option that does not modify diff, but colors it only. It’s typically used with interactive staging for git according to the docs. https://github.com./dandavison/delta#get-started
Also, for reference, from the git man page:
So maybe we can have something equivalent, like:
|
Since the pager issue cannot be solved temporarily, can we some how at least be able to scroll custom_pager to preview all changes when there're too much changes in one file? Currently we can only preview the most top changes in one file, which depends on the size of the window and cannot scroll. |
Huh? We used to have a bug that prevented scrolling in the diff view, but it was fixed back in 0.37. I can definitely scroll the diff to see all changes. Can you explain this more? |
@stefanhaller Oh sorry! I realized that it's an issue with my terminal Warp, it's ok in iTerm. |
Topic
When I enable pager as delta or diff-so-fancy as described, syntax highlighting enables only when staging a file. When I want to stage line by line, pager doesnt affects stage and unstage area. How can I enable pager for both file and line staging?
The text was updated successfully, but these errors were encountered: