Handle view updates when following

Basic following now works. Editors' scroll positions
are their only replicated view state.
This commit is contained in:
Max Brunsfeld 2022-03-18 15:56:57 -07:00
parent e338da0271
commit 570c987455
4 changed files with 152 additions and 111 deletions

View file

@ -1,7 +1,5 @@
use super::{ItemHandle, SplitDirection};
use crate::{Item, Settings, WeakItemHandle, Workspace};
use anyhow::{anyhow, Result};
use client::PeerId;
use collections::{HashMap, VecDeque};
use gpui::{
action,
@ -258,7 +256,7 @@ impl Pane {
let task = task.await;
if let Some(pane) = pane.upgrade(&cx) {
if let Some((project_entry_id, build_item)) = task.log_err() {
pane.update(&mut cx, |pane, cx| {
pane.update(&mut cx, |pane, _| {
pane.nav_history.borrow_mut().set_mode(mode);
});
let item = workspace.update(&mut cx, |workspace, cx| {