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
46.88k stars 2.68k forks source link

Confusing cursor position on ligature fonts even when ligatures are disabled #7713

Open zxaos opened 7 months ago

zxaos commented 7 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When advancing over a set of characters, sometimes zed will display a misleading or wrong character under the cursor.

Environment

Zed: v0.123.0 (Zed Dev) OS: macOS 14.2.1 Memory: 32 GiB Architecture: aarch64

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

Here's screen recordings of me pressing right arrow 8 times.

Zed Mono (correct): ZedMono

Monaspace Neon: Note on the fourth keypress we get (* highlighted as one character On the fifth keypress we get * but it's instead incorrectly rendered over the d On the sixth keypress what was previously * now becomes d again in the same position. Monaspace Neon

This is really confusing when typing.

Notably, in my settings, these were set during the recording:

  "buffer_font_features": {
    "calt": false,
    "liga": false,
    "dlig": false,
    "ss01": false,
    "ss02": false,
    "ss03": false,
    "ss04": false,
    "ss05": false,
    "ss06": false,
    "ss07": false
  }

Although, for completeness, they were set to true when zed started up and I changed the afterward while trying to debug this.

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

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

zxaos commented 4 months ago

This might be related to githubnext/monaspace#132