Diff View: Scroll to center of hunks when reviewing (#25846)
When reviewing hunks, scroll to put them at the center of the screen so you can better see the context around that hunk. The field `center_cursor` was added to the actions `editor::GoToHunk` and `editor::GoToPrevHunk`, this was set to `false` by default in keymaps, as it wouldn't help with in-editor navigation. The field is set to `true` for when you trigger `git::StageAndNext` and `git::UnstageAndNext`, this is also `true` for the buttons in the Diff View toolbar. Release Notes: - N/A
This commit is contained in:
@@ -238,8 +238,8 @@
|
||||
"] x": "vim::SelectSmallerSyntaxNode",
|
||||
"] d": "editor::GoToDiagnostic",
|
||||
"[ d": "editor::GoToPrevDiagnostic",
|
||||
"] c": "editor::GoToHunk",
|
||||
"[ c": "editor::GoToPrevHunk",
|
||||
"] c": ["editor::GoToHunk", { "center_cursor": true }],
|
||||
"[ c": ["editor::GoToPrevHunk", { "center_cursor": true }],
|
||||
"g c": "vim::PushToggleComments"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user