mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 09:44:46 +03:00
Clear selections on buffer only if they hadn't been cleared already
This commit is contained in:
parent
b4561b848d
commit
a435dc1339
@ -1353,7 +1353,13 @@ impl Buffer {
|
||||
}
|
||||
|
||||
pub fn remove_active_selections(&mut self, cx: &mut ModelContext<Self>) {
|
||||
self.set_active_selections(Arc::from([]), false, Default::default(), cx);
|
||||
if self
|
||||
.remote_selections
|
||||
.get(&self.text.replica_id())
|
||||
.map_or(true, |set| !set.selections.is_empty())
|
||||
{
|
||||
self.set_active_selections(Arc::from([]), false, Default::default(), cx);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_text<T>(&mut self, text: T, cx: &mut ModelContext<Self>) -> Option<clock::Local>
|
||||
|
Loading…
Reference in New Issue
Block a user