# Fix block cursor using placeholder text even when it's not displayed \(\#32766\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c0717bc61345d074456a8ac67111eb70ffa021e3

Requested commit: c0717bc61345d074456a8ac67111eb70ffa021e3

Commit: c0717bc61345d074456a8ac67111eb70ffa021e3

Tree: ce67a3a3d735628ae832d87ed7890b0b16094896

Author: Michael Sloan

Committer: GitHub

## Message

```
Fix block cursor using placeholder text even when it's not displayed (#32766)

The condition for displaying the first char of the placeholder text in
the block cursor was `cursor_column == 0`. This meant that it was
displayed on the first column even when the placeholder text is not
being displayed. Instead this now shows it only when
`snapshot.is_empty()` - the same condition used to determine whether to
show placeholder text.

In the case of vim mode + agent panel message editor, this meant that if
you did `shift-enter` to make a newline and then `escape` to enter
normal mode, the block cursor would show `M` inside it as that's the
first character of the placeholder text "Message the agent - @ to
include context"

Release Notes:

- N/A
```

## Parents

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

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