-
-
Notifications
You must be signed in to change notification settings - Fork 304
improve: Add config option to change <cr> over hunks on commit_view #1866
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?
improve: Add config option to change <cr> over hunks on commit_view #1866
Conversation
|
I see tests failed but due to unrelated changes. I've checked locally that they also fail with the code in master. |
2c318ff to
70f7318
Compare
|
I don't think the test failure is related. It seems an error due to a tight timing: |
|
Yea, the e2e tests are a bit weird. They run way more reliably locally than on CI, and I don't know why... and debugging that feels more like "work" than "fun". Anyways, instead of boolean configs like this, I'd rather solve it with mappings more like how the status buffer is set up: I think thats more flexible - having a load of boolean configs seems like a road to madness - as well as consistent. |
- New `commit_view.cr_on_hunk_jumps_to_current` option to interchange the behaviour of `<cr>` with the mapping for the `OpenFileInWorktree` command. - This allows to set `<cr>` as the mapping to jump to the current version of the file. - Defaulted to false, i.e., preserve default magit behaviour.
70f7318 to
1eee02b
Compare
I completely agree with that. The thing is that I discarded initially that approach because I was reusing a mapping for the "open file in commit" functionality ( That said, after your feedback, I decided to give it a try and implement a logic to allow clashing mappings that target different components in the commit view. With that infrastructure, we can now define a new mapping for "OpenFileInCommit" that can be set to
If you think this is too complicated just let me know and we can discuss a better way 😄 |
commit_view.cr_on_hunk_jumps_to_currentoption to interchange the behaviour of<cr>with the mapping for theOpenFileInWorktreecommand.<cr>as the mapping to jump to the current version of the file.