# Revert "gpui: Fix \`shape_text\` split to support \\r\\n" \(\#31031\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 65e751ca339b59a2e90408d76472fe6a5dcf3009

Requested commit: 65e751ca339b59a2e90408d76472fe6a5dcf3009

Commit: 65e751ca339b59a2e90408d76472fe6a5dcf3009

Tree: 52d1466263c5c72902b3201f5767e04ca0b963a6

Author: Jason Lee

Committer: GitHub

## Message

```
Revert "gpui: Fix `shape_text` split to support \r\n" (#31031)

Reverts zed-industries/zed#31022

Sorry @mikayla-maki, I found that things are more complicated than I
thought.

The lines returned by shape_text must maintain the same length as all
the original characters, otherwise the subsequent offset needs to always
consider the difference of `\r\n` or `\n` to do the offset.

Before, we only needed to add +1 after each offset after the line, but
now we need to consider +1 or +2, which is much more complicated.
```

## Parents

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

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