CollapseAllDiffHunks action for editor (#40668)
This PR adds a new action `editor::CollapseAllDiffHunks` which will allow the user to choose any keybinding for hiding the Expanded Diff Hunks.
This commit is contained in:
@@ -18792,6 +18792,17 @@ impl Editor {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn collapse_all_diff_hunks(
|
||||
&mut self,
|
||||
_: &CollapseAllDiffHunks,
|
||||
_window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.buffer.update(cx, |buffer, cx| {
|
||||
buffer.collapse_diff_hunks(vec![Anchor::min()..Anchor::max()], cx)
|
||||
});
|
||||
}
|
||||
|
||||
pub fn toggle_selected_diff_hunks(
|
||||
&mut self,
|
||||
_: &ToggleSelectedDiffHunks,
|
||||
|
||||
Reference in New Issue
Block a user