Skip to content

Adding attributes to JSX start tag in vim mode sometimes erroneously edits the closing tag as well #27466

@jaredly

Description

@jaredly

Summary

with the code return <div></div> and your cursor on the first >, i to edit and quickly type " style", it adds style after the final > as well. Doesn't always happen, but is super annoying when it does.

Steps to trigger the problem:

  1. code: return <div></div>
  2. be in vim normal mode, cursor over the first >
  3. (quickly all in a row) i to enter insert mode, then type " style", because you want to add a style attribute
  4. might have to try a couple times, but it clearly decides that you're trying to edit the tag name to be div style, and the closing tag becomes </div>style

Actual Behavior:
it also edits the closing tag

Expected Behavior:
it shouldn't edit the closing tag

appp.mov

Zed Version and System Specs

Zed 0.178.5 7772fae

M1 Macos 15.3.2 (24D81)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions