# Introduce \`ViewContext::on_window_should_close\` · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/06033d7fa9b14cf0defcd40b63c5f97cf21cf4e9)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 06033d7fa9b14cf0defcd40b63c5f97cf21cf4e9

Requested commit: 06033d7fa9b14cf0defcd40b63c5f97cf21cf4e9

Commit: 06033d7fa9b14cf0defcd40b63c5f97cf21cf4e9

Tree: c1e502ce1851a36a31d7fa7d08690ff6dd689f20

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Introduce `ViewContext::on_window_should_close`

This is a new callback that can be used to interrupt closing the window
when the user has unsaved changes.

```

## Parents

- [ca8ddcdeec4508b69a0fb29d7a6fa14960514da1](https://git.cafe/gitcafe/zed/commit/ca8ddcdeec4508b69a0fb29d7a6fa14960514da1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/06033d7fa9b14cf0defcd40b63c5f97cf21cf4e9?format=markdown)
