Merge pull request #866 from zed-industries/max-line-len-2

Always wrap lines that are wider than 512 em advances
This commit is contained in:
Max Brunsfeld 2022-04-21 11:23:29 -07:00 committed by GitHub
commit f9cd1b25d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}