Support hunk-wise StageAndNext
and UnstageAndNext
(#25845)
This PR adds the `whole_excerpt` field to the actions: - `git::StageAndNext` - `git::UnstageAndNext` Which is set by false by default, effectively, now staging and unstaging with these actions is done hunk-by-hunk, this also affects the `Stage` and `Unstage` buttons in the Diff View toolbar. A caveat: with this PR, there is no way to configure the buttons in the Diff View toolbar to restore the previous behavior, if we want, I think we can make it a setting, but let's see if anyone really wants that. Release Notes: - N/A
This commit is contained in:
parent
13deaa3f69
commit
a2876f5d3e
7 changed files with 93 additions and 35 deletions
|
@ -370,8 +370,8 @@
|
|||
"ctrl-shift-v": "markdown::OpenPreview",
|
||||
"ctrl-alt-shift-c": "editor::DisplayCursorNames",
|
||||
"ctrl-alt-y": "git::ToggleStaged",
|
||||
"alt-y": "git::StageAndNext",
|
||||
"alt-shift-y": "git::UnstageAndNext",
|
||||
"alt-y": ["git::StageAndNext", { "whole_excerpt": false }],
|
||||
"alt-shift-y": ["git::UnstageAndNext", { "whole_excerpt": false }],
|
||||
"alt-.": "editor::GoToHunk",
|
||||
"alt-,": "editor::GoToPrevHunk"
|
||||
}
|
||||
|
|
|
@ -131,8 +131,8 @@
|
|||
"cmd-;": "editor::ToggleLineNumbers",
|
||||
"cmd-alt-z": "git::Restore",
|
||||
"cmd-alt-y": "git::ToggleStaged",
|
||||
"cmd-y": "git::StageAndNext",
|
||||
"cmd-shift-y": "git::UnstageAndNext",
|
||||
"cmd-y": ["git::StageAndNext", { "whole_excerpt": false }],
|
||||
"cmd-shift-y": ["git::UnstageAndNext", { "whole_excerpt": false }],
|
||||
"cmd-'": "editor::ToggleSelectedDiffHunks",
|
||||
"cmd-\"": "editor::ExpandAllDiffHunks",
|
||||
"cmd-alt-g b": "editor::ToggleGitBlame",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue