# Replace usages of \`is_parent_view_focused\` with \`is_self_focused\` · gitcafe/zed

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

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

Visibility: public

Requested revision: b9ed327b944556cbe33682685ca7b1aa9f66413c

Requested commit: b9ed327b944556cbe33682685ca7b1aa9f66413c

Commit: b9ed327b944556cbe33682685ca7b1aa9f66413c

Tree: b6ae101273d09a451dc3822de6d77ee1af8e0daa

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Replace usages of `is_parent_view_focused` with `is_self_focused`

Previously, this was used because we didn't have access to the current
view and `EventContext` was an element-only abstraction. Now that the
`EventContext` wraps the current view's `ViewContext` we can simply check
for the view's focus and avoid querying ancestors.

```

## Parents

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

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