# Properly measure invisible character replacement \(\#62478\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 47825fe00a8f8aba46a7552fcdf99918bad8cb21

Requested commit: 47825fe00a8f8aba46a7552fcdf99918bad8cb21

Commit: 47825fe00a8f8aba46a7552fcdf99918bad8cb21

Tree: 0732077e0f95e00c1877d54cae78a14f5a506020

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Properly measure invisible character replacement (#62478)

Another discovery during search-on-type work.

Follow-up to https://github.com/zed-industries/zed/pull/19298 and
https://github.com/zed-industries/zed/pull/19846

With the `"soft_wrap": "editor_width"`, I should have no text contents
overflowing the editor width.

Before (scrollbar shown incorrectly):
<img width="2032" height="1162" alt="before"
src="https://github.com/user-attachments/assets/8b89ba6d-f98b-4ea0-89f2-8a22e968c438"
/>

After:
<img width="2032" height="1162" alt="after"
src="https://github.com/user-attachments/assets/93f62c2b-4981-48ae-aebd-8b0021348787"
/>


Release Notes:

- Fixed invisible symbol replacement width calculation
```

## Parents

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

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