# editor: Fix blocks not appearing or lingering when anchored past a soft wrap \(\#59018\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6d0e7ff18ce65241bf382c8418399712cfb6b564

Requested commit: 6d0e7ff18ce65241bf382c8418399712cfb6b564

Commit: 6d0e7ff18ce65241bf382c8418399712cfb6b564

Tree: a795769295e41c9ac797bdabf69f7bd201f4a52e

Author: Smit Barmase

Committer: GitHub

## Message

````
editor: Fix blocks not appearing or lingering when anchored past a soft wrap (#59018)

I came across this while tackling another block map sync issue.

When a block is anchored past the point where its line soft wraps,
inserting or removing it invalidated the wrong range of rows. Inserting
such a block alone could silently not show it, and removing it could
leave the block on screen.

To reproduce: 

```sh
SEED=113 ITERATIONS=1 cargo test -p editor test_random_blocks
```

Release Notes:

- Fixed inline assistant prompt sometimes not appearing, or lingering
after dismissal, when that line was soft-wrapped.
````

## Parents

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

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