Merge branch 'main' into lsp-file-change-notifications

This commit is contained in:
Max Brunsfeld 2023-03-24 08:52:43 -07:00
commit 027def6800
13 changed files with 70 additions and 40 deletions

View file

@ -43,11 +43,12 @@ impl Project {
.push(terminal_handle.downgrade());
let id = terminal_handle.id();
cx.observe_release(&terminal_handle, move |project, _terminal, _cx| {
cx.observe_release(&terminal_handle, move |project, _terminal, cx| {
let handles = &mut project.terminals.local_handles;
if let Some(index) = handles.iter().position(|terminal| terminal.id() == id) {
handles.remove(index);
cx.notify();
}
})
.detach();