Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange editor area when showing plain text content #12473

Closed
1 task done
char8x opened this issue May 30, 2024 · 6 comments · Fixed by #14331
Closed
1 task done

Strange editor area when showing plain text content #12473

char8x opened this issue May 30, 2024 · 6 comments · Fixed by #14331
Labels
documentation [core label] editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label]

Comments

@char8x
Copy link

char8x commented May 30, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When using plain text, a blank area appears in the editor.

图片

When using JavaScript, the blank area disappears.

图片

Environment

Zed: v0.137.3
OS: macOS 13.6.7 arm64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@char8x char8x added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 30, 2024
@jansol
Copy link
Contributor

jansol commented May 30, 2024

Looks more like you have wrap guides disabled for JavaScript and for Plain Text you get a wrap guide at 80 columns or so?

@char8x
Copy link
Author

char8x commented May 30, 2024

Here is my settings, I didn't change the properties related to line wrapping

{
  "theme": "One Dark",
  "buffer_font_family": "MesloLGS Nerd Font Mono",
  "auto_update": false,
  "base_keymap": "VSCode",
  "telemetry": {
    "metrics": false,
    "diagnostics": false
  },
  "ui_font_size": 16,
  "buffer_font_size": 16
}

@jansol
Copy link
Contributor

jansol commented May 31, 2024

Hm, looks like there indeed should not be any wrap guides by default.

From the default settings:

 // Whether to show wrap guides in the editor. Setting this to true will
  // show a guide at the 'preferred_line_length' value if 'soft_wrap' is set to
  // 'preferred_line_length', and will show any additional guides as specified
  // by the 'wrap_guides' setting.
  "show_wrap_guides": true,
  // Character counts at which to show wrap guides in the editor.
  "wrap_guides": [],
  // How to soft-wrap long lines of text. This setting can take
  // three values:
  //
  // 1. Do not soft wrap.
  //      "soft_wrap": "none",
  // 2. Prefer a single line generally, unless an overly long line is encountered.
  //      "soft_wrap": "prefer_line",
  // 3. Soft wrap lines that overflow the editor:
  //      "soft_wrap": "editor_width",
  // 4. Soft wrap lines at the preferred line length
  //      "soft_wrap": "preferred_line_length",
  "soft_wrap": "prefer_line",
  // The column at which to soft-wrap lines, for buffers where soft-wrap
  // is enabled.
  "preferred_line_length": 80,

No language overrides for Plain Text either...

@char8x
Copy link
Author

char8x commented May 31, 2024

Hm, looks like there indeed should not be any wrap guides by default.

When I set show_wrap_guides to false, the blank area disappears

图片

@jansol
Copy link
Contributor

jansol commented May 31, 2024

Ah right, I vaguely remember that there is an implicit wrap guide drawn at preferred_line_length even if the wrap_guides list is empty. That should probably be documented better (or changed).

@JosephTLyons JosephTLyons added enhancement [core label] documentation [core label] editor Feedback for code editing, formatting, editor iterations, etc and removed defect [core label] triage Maintainer needs to classify the issue admin read Pending admin review labels May 31, 2024
@notpeter
Copy link
Contributor

This is fixed in dev. Plain Text buffers (the default for untitled buffers) now default to soft wrapping at the window width and not at preferred_line_length. So there will no longer be a wrap_guide by default in those buffers.

This fix is available in dev today, in the next version of Zed Preview on Wednesday (2024-07-17) and in Zed Stable a week later (2024-07-24). Thanks for reporting!

SomeoneToIgnore pushed a commit that referenced this issue Jul 15, 2024
- Remove wrap guide / vertical ruler in untitled buffers
- Fixes #12473
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation [core label] editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants