zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.57k stars 3.04k forks source link

Content Displayed in Only 1/4 of Window #13672

Open CurbaiCode opened 4 months ago

CurbaiCode commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Whenever I open a new Zed window, all of the content is shrunk down to fit in the top left corner of the window itself; However, everything interacts with the mouse as if it were displaying correctly, so using my mouse in the black area (highlights, selects, clicks, etc.) are shown in the shrunk view. I did a binary search and found it begins with v0.135.2. As soon as I resize the window, the content fills the entire window and functions normally.

Environment

Zed: v0.141.3 (Zed) OS: macOS 11.7.4 Memory: 8 GiB Architecture: x86_64

If applicable, add screenshots to help explain the bug

Screen Shot 2024-06-29

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

Zed.log
2024-06-29T09:19:44-06:00 [INFO] ========== starting zed ==========
2024-06-29T09:19:44-06:00 [INFO] Opening main db
2024-06-29T09:19:44-06:00 [INFO] Using git binary path: Some("~/Applications/Zed.app/Contents/MacOS/git")
2024-06-29T09:19:44-06:00 [INFO] set environment variables from shell:/bin/zsh, path:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
2024-06-29T09:19:44-06:00 [ERROR] crates/theme/src/settings.rs:493: theme not found
2024-06-29T09:19:44-06:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-06-29T09:19:45-06:00 [INFO] Opening main db
2024-06-29T09:19:45-06:00 [WARN] Theme is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-06-29T09:19:45-06:00 [WARN] Theme is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-06-29T09:19:45-06:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-06-29T09:19:45-06:00 [INFO] Opening main db
2024-06-29T09:19:45-06:00 [INFO] Node runtime install_if_needed
2024-06-29T09:19:46-06:00 [INFO] starting language server. binary path: "~/Library/Application Support/Zed/node/node-v18.15.0-darwin-x64/bin/node", working directory: "/", args: ["~/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-06-29T09:19:47-06:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-06-29T15:19:47.397Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-06-29T15:19:47.397Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-06-29T09:19:47-06:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "73dff58f-3777-4956-9a3d-63cd31631396",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-06-29T09:19:47-06:00 [INFO] Took 955.93421ms to receive response to "initialize" id 0
2024-06-29T09:19:47-06:00 [INFO] Took 5.368621ms to receive response to "checkStatus" id 1
2024-06-29T09:19:47-06:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-06-29T15:19:47.430Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-06-29T15:19:47.430Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-06-29T09:19:47-06:00 [INFO] Took 75.887737ms to receive response to "setEditorInfo" id 2
notpeter commented 4 months ago

Hi @CurbaiCode, I'm sorry to see you're running into this. We only officially support Zed running on MacOS releases still supported by Apple. MacOS 11.7 (Big Sur) was EOL'd 2023-09-26 (9 months ago).

That said:

  1. Is this something that cropped up with a recent Zed update or has it been like this since you first downloaded Zed?
  2. What screen resolution are you running at? (IIRC option clicking on the "Larger Text" / "More Space" icons in Displays system preferences pane shows actual resolutions). Does this happen at other screen resolutions?
CurbaiCode commented 4 months ago
  1. Since this issue doesn't really negatively affect my workflow, it has been a few updates since the problem cropped up, but I went through previous releases and found it starts with v0.135.2.
  2. Interestingly, I tried the other resolutions for my display (1280x720 and 1152x648) and the window displays fine. It's just at the default resolution of 1366x768 that this issue arises.
notpeter commented 4 months ago

1366x768 seems to be the culprit. Another user reported the same in Monterey (Mac 10.12) in #13663 by @PrashantSakre. (@PrashantSakre please additional any info you have to this issue).

My Macbook nor display support that resolution, and none of the similar resolutions are triggering this bug for me. Do you mind sharing your Macbook model and whether this is with the internal or external display?

Are there any specific reproduction steps (window maximized, etc) would be greatly appreciated. Thanks!

CurbaiCode commented 4 months ago

Yeah, that seems to be the same issue. Sorry I didn't find that one in my search for existing ones.

It is a MacBook Air (11-inch, Mid 2013) and this happens with the internal display. I have tried with external displays, but it doesn't happen then or even with mirroring turned on. I can't identify any specific steps, but here is my settings configuration if that helps:

settings.json
{
    "theme": {
        "mode": "system",
        "light": "One Light",
        "dark": "One Dark"
    },
    "base_keymap": "VSCode",
    "features": {
        "copilot": false
    },
    "buffer_font_family": "Zed Mono",
    "buffer_font_size": 14,
    "buffer_line_height": {
        "custom": 1.5
    },
    "ui_font_size": 16,
    "show_copilot_suggestions": false,
    "calls": {
        "mute_on_join": true,
        "share_on_join": false
    },
    "vertical_scroll_margin": 1,
    "seed_search_query_from_cursor": "selection",
    "assistant": {
        "version": "1",
        "button": false,
        "enabled": false
    },
    "tabs": {
        "git_status": true,
        "close_position": "left"
    },
    "ensure_final_newline_on_save": false,
    "format_on_save": "off",
    "soft_wrap": "none",
    "hard_tabs": true,
    "tab_size": 4,
    "telemetry": {
        "diagnostics": false,
        "metrics": false
    },
    "terminal": {
        "line_height": {
            "custom": 1.5
        }
    },
    "languages": {
        "Plain Text": {
            "soft_wrap": "editor_width"
        },
        "Markdown": {
            "tab_size": 4,
            "soft_wrap": "editor_width"
        },
        "JavaScript": {
            "tab_size": 4
        },
        "JSON": {
            "tab_size": 4
        },
        "Git Config": {
            "soft_wrap": "editor_width"
        }
    },
    "task": {
        "show_status_indicator": false
    }
}
PrashantSakre commented 4 months ago

For me this happened with an external monitor connected ( to Macmini 2014 ) that has 1366x768 resolution.

notpeter commented 1 day ago

@0x2CA @vamshinenu You two appear to be seeing this with non 1366x768 displays (1920x1080?). Curious if you could share any details about your setups so we can try and reproduce.

vamshinenu commented 1 day ago

@notpeter So, I use a small HDMI to type C thing for one monitor while the other connects with just the HDMI to Mac Book. and not using a display link device. I have one, if you'd want me to trying something, and can try connect with display ports.

I can, and also I use the f.lux, app to control the brightness, and sometimes, I do see a flicker when opening and closing few app's (not zed) but just FYI.

LEN P24q-20: Resolution: 2560 x 1440 (QHD/WQHD - Wide Quad High Definition) UI Looks like: 2560 x 1440 @ 75.00Hz Mirror: Off Online: Yes Rotation: Supported

Mac OS: 15.1 (24B83)

let me know if you need anything else.