-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Improve clicking in diff view to enter staging/patch building #3985
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
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 preferencesFootnotes
|
5e84f7e
to
a20477d
Compare
a20477d
to
dc9c309
Compare
dc9c309
to
ff1e6a8
Compare
ff1e6a8
to
f6912c8
Compare
f6912c8
to
6b1431d
Compare
One things that's a little strange is that when looking at the diff of a commit, it takes one click (or enter keypress) to go to patch building, but then it takes two escape presses to get out again. It's weird and takes some getting used to, but I think it's a good price to pay because the feature is so useful. If it bothers us too much we can consider remembering where we came from, and have esc take you all the way out to commits in that case (which may also be confusing though). |
I added a commit that does this, I think I prefer it this way (needs more testing though). |
ebd7852
to
06db652
Compare
b45c992
to
bc1cf22
Compare
06db652
to
5355731
Compare
bc1cf22
to
15b6116
Compare
5355731
to
e7e49dd
Compare
15b6116
to
678280f
Compare
e7e49dd
to
c5fc123
Compare
678280f
to
03f1307
Compare
c5fc123
to
b51fdb7
Compare
03f1307
to
afa3b7f
Compare
b51fdb7
to
0c20f49
Compare
afa3b7f
to
f104a15
Compare
0c20f49
to
4e21a09
Compare
…building This was already possible, but only when a file was selected, and it woudln't always land on the right line when a pager was used. Now it's also possible to do this for directories, and it jumps to the right line. At the moment this is a hack that relies on delta's hyperlinks, so it only works on lines that have hyperlinks (added and context). The implementation is very hacky for other reasons too (e.g. the addition of the weirdly named ClickedViewRealLineIdx to OnFocusOpts).
… clicked line This involves first switching to the commit files view, and then entering the clicked file from there.
…ll the way back out I *think* I like it better this way, but it needs more testing.
f104a15
to
983f6f8
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.This now sits on top of #4429; you can click in the focused main view or hit enter to go to staging/patch-building.
See #3986 for more information.
The implementation is a very rough proof of concept only; don't review the code (yet).