# Revert "gpui: Unify the index_for_x methods \(\#42162\)" \(\#42505\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ddf762e368352ae372b7631f7eebda4f5366e8bd

Requested commit: ddf762e368352ae372b7631f7eebda4f5366e8bd

Commit: ddf762e368352ae372b7631f7eebda4f5366e8bd

Tree: 6fb69d524a4c1ff97860381931d108f7c110dbf1

Author: Kirill Bulatov

Committer: GitHub

## Message

````
Revert "gpui: Unify the index_for_x methods (#42162)" (#42505)

This reverts commit 082b80ec89748bf238f0068da80e12211fb3c7d6.

This broke clicking, e.g. in snippets like

```rs
let x = vec![
    1, 2, //
    3,
];
```

clicking between `2` and `,` is quite off now.

Release Notes:

- N/A
````

## Parents

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

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