mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
Always wrap lines that are wider than 512 em advances
We went with a more conservative upper bound so that the number of characters (hopefully) never exceeds `MAX_LINE_LEN` (1024) when laying out text. Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
80b4324807
commit
5081eafa9d
1 changed files with 1 additions and 1 deletions
|
@ -851,7 +851,7 @@ impl Element for EditorElement {
|
|||
let overscroll = vec2f(em_width, 0.);
|
||||
let snapshot = self.update_view(cx.app, |view, cx| {
|
||||
let wrap_width = match view.soft_wrap_mode(cx) {
|
||||
SoftWrap::None => None,
|
||||
SoftWrap::None => Some((MAX_LINE_LEN / 2) as f32 * em_advance),
|
||||
SoftWrap::EditorWidth => {
|
||||
Some(text_width - gutter_margin - overscroll.x() - em_width)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue