Update selection when keeping/rejecting hunks (#27902)
Release Notes: - N/A
This commit is contained in:
parent
57d7bc23ae
commit
c1d6dfd832
9 changed files with 367 additions and 114 deletions
|
@ -225,15 +225,17 @@ impl Tool for FindReplaceFileTool {
|
|||
return Err(err)
|
||||
};
|
||||
|
||||
let snapshot = buffer.update(cx, |buffer, cx| {
|
||||
buffer.finalize_last_transaction();
|
||||
buffer.apply_diff(diff, cx);
|
||||
buffer.finalize_last_transaction();
|
||||
buffer.snapshot()
|
||||
})?;
|
||||
|
||||
action_log.update(cx, |log, cx| {
|
||||
log.buffer_edited(buffer.clone(), cx)
|
||||
let snapshot = cx.update(|cx| {
|
||||
let snapshot = buffer.update(cx, |buffer, cx| {
|
||||
buffer.finalize_last_transaction();
|
||||
buffer.apply_diff(diff, cx);
|
||||
buffer.finalize_last_transaction();
|
||||
buffer.snapshot()
|
||||
});
|
||||
action_log.update(cx, |log, cx| {
|
||||
log.buffer_edited(buffer.clone(), cx)
|
||||
});
|
||||
snapshot
|
||||
})?;
|
||||
|
||||
project.update( cx, |project, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue