mirror of
https://github.com/encounter/zed.git
synced 2026-07-11 06:19:04 -07:00
Keep all hunks expanded in proposed change editor (#18598)
Also, fix visual bug when pressing escape with a non-empty selection in a deleted text block. Release Notes: - N/A Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
@@ -3059,7 +3059,7 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext<Self>) {
|
||||
if self.clear_clicked_diff_hunks(cx) {
|
||||
if self.clear_expanded_diff_hunks(cx) {
|
||||
cx.notify();
|
||||
return;
|
||||
}
|
||||
|
||||
+253
-187
File diff suppressed because it is too large
Load Diff
@@ -63,8 +63,11 @@ impl ProposedChangesEditor {
|
||||
let (recalculate_diffs_tx, mut recalculate_diffs_rx) = mpsc::unbounded();
|
||||
|
||||
Self {
|
||||
editor: cx
|
||||
.new_view(|cx| Editor::for_multibuffer(multibuffer.clone(), project, true, cx)),
|
||||
editor: cx.new_view(|cx| {
|
||||
let mut editor = Editor::for_multibuffer(multibuffer.clone(), project, true, cx);
|
||||
editor.set_expand_all_diff_hunks();
|
||||
editor
|
||||
}),
|
||||
recalculate_diffs_tx,
|
||||
_recalculate_diffs_task: cx.spawn(|_, mut cx| async move {
|
||||
let mut buffers_to_diff = HashSet::default();
|
||||
|
||||
Reference in New Issue
Block a user