-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Improve clicking in diff view to enter staging/patch building #3985
base: master
Are you sure you want to change the base?
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
5e84f7e
to
a20477d
Compare
Apparently this was an attempt at working around go's lack of default arguments, but it's very unidiomatic and a bit confusing. Make it a normal parameter instead, so all clients have to pass it explicitly.
I can only guess here: maybe they were added to more clearly document the public interface of the classes? If so, I don't think that works. Developers who are not familiar with the convention will just add a new public method to the class without updating the interface.
This involves first switching to the commit files view, and then entering the clicked file from there.
a20477d
to
dc9c309
Compare
When using delta with the
--hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"
option, you can now click on a line that has an underlined line number, and it will take you straight to the staging panel (when you're in the files panel) or the patch building panel (when you're looking at a commit). Previously this was already possible when a single file was selected in the files panel; but it didn't work when a directory was selected, or when looking at the diff of a commit.See #3986 for more information.
The implementation is a very rough proof of concept only; don't review the code (yet).