# Limit BufferSnapshot::surrounding_word search to 256 characters \(\#32016\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 81f8e2ed4aeaefe9d7b9ad8cce9df1c335046bfd

Requested commit: 81f8e2ed4aeaefe9d7b9ad8cce9df1c335046bfd

Commit: 81f8e2ed4aeaefe9d7b9ad8cce9df1c335046bfd

Tree: d2c691b2d1c4dceffaa7c6c8f527da6ab4b2a195

Author: Anthony Eid

Committer: GitHub

## Message

```
Limit BufferSnapshot::surrounding_word search to 256 characters (#32016)

This is the first step to closing #16120. Part of the problem was that
`surrounding_word` would search the whole line for matches with no
limit.

Co-authored-by: Conrad Irwin \<conrad@zed.dev\>
Co-authored-by: Ben Kunkle \<ben@zed.dev\>
Co-authored-by: Cole Miller \<cole@zed.dev\>

Release Notes:

- N/A
```

## Parents

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

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