mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-25 16:09:44 +00:00
Don't scroll to cursor when performing file save
This commit is contained in:
parent
9d57f761c5
commit
7b71554b58
1 changed files with 1 additions and 4 deletions
|
@ -397,7 +397,7 @@ impl Item for Editor {
|
|||
let buffers = buffer.read(cx).all_buffers();
|
||||
let mut timeout = cx.background().timer(FORMAT_TIMEOUT).fuse();
|
||||
let format = project.update(cx, |project, cx| project.format(buffers, true, cx));
|
||||
cx.spawn(|this, mut cx| async move {
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
let transaction = futures::select_biased! {
|
||||
_ = timeout => {
|
||||
log::warn!("timed out waiting for formatting");
|
||||
|
@ -406,9 +406,6 @@ impl Item for Editor {
|
|||
transaction = format.log_err().fuse() => transaction,
|
||||
};
|
||||
|
||||
this.update(&mut cx, |editor, cx| {
|
||||
editor.request_autoscroll(Autoscroll::Fit, cx)
|
||||
});
|
||||
buffer
|
||||
.update(&mut cx, |buffer, cx| {
|
||||
if let Some(transaction) = transaction {
|
||||
|
|
Loading…
Reference in a new issue