Fix cx.windows() to return borrowed windows (#8086)

Fixes #8068

Release Notes:

- Fixed an error message when joining a project twice
([#8068](https://github.com/zed-industries/zed/issues/8068)).
This commit is contained in:
Conrad Irwin 2024-02-20 13:42:11 -07:00 committed by GitHub
parent 5c7cec9f85
commit 3d9503a454
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 9 deletions

View file

@ -422,8 +422,8 @@ fn quit(_: &Quit, cx: &mut AppContext) {
// If multiple windows have unsaved changes, and need a save prompt,
// prompt in the active window before switching to a different window.
cx.update(|cx| {
workspace_windows.sort_by_key(|window| window.is_active(&cx) == Some(false));
cx.update(|mut cx| {
workspace_windows.sort_by_key(|window| window.is_active(&mut cx) == Some(false));
})
.log_err();