# Fix anchor biases for completion replacement ranges \(esp slash commands\) \(\#32262\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e0057ccd0fc7773c4c84768af04bb1b89069ff05

Requested commit: e0057ccd0fc7773c4c84768af04bb1b89069ff05

Commit: e0057ccd0fc7773c4c84768af04bb1b89069ff05

Tree: 90242879db7436ae992f2402dbb710c35e0adb8d

Author: Michael Sloan

Committer: GitHub

## Message

```
Fix anchor biases for completion replacement ranges (esp slash commands) (#32262)

Closes #32205

The issue was that in some places the end of the replacement range used
anchors with `Bias::Left` instead of `Bias::Right`. Before #31872
completions were recomputed on every change and so the anchor bias
didn't matter. After that change, the end anchor didn't move as the
user's typing. Changing it to `Bias::Right` to "stick" to the character
to the right of the cursor fixes this.

Release Notes:

- Fixes incorrect auto-completion of `/files` in text threads (Preview
Only)
```

## Parents

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

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