#66324

Link underline extends over whitespace inserted before an alt-clicked URL

Opennachocabopened 18h ago

Reproduction steps

Settings: "soft_wrap": "editor_width", "multi_cursor_modifier": "cmd_or_ctrl" (so alt-click opens links).

  1. Type a URL long enough to soft-wrap, e.g. https://github.com/whatever/long-sentence-long-sentence-long-sentence-…
  2. Alt-hover the URL with the mouse.
  3. Use the arrow keys to move the cursor to the start of the URL.
  4. Press enter or tab.
  5. Press cmd-shift-right to select to the end of the first visual row.

Current vs. Expected behavior

Two problems are visible in the screenshot:

  1. Stray underline. After step 4, an underline appears under the empty space to the left of the URL, where the newline or tab was inserted. It looks like the link underline from the alt-click keeps its range and stretches to cover text inserted at its start. Expected: no underline on the inserted whitespace.
  2. Selection stops one character short. In step 5 the selection ends before the final r of whatever, the last character before the soft wrap. Expected: the selection includes it. This looks like #23314 (cursor can't sit at the end of a soft-wrapped line).

Zed version and system specs

Zed: v1.26.2 OS: macOS 26.7.2 Architecture: aarch64

Activity

0

No activity yet.