Skip to content

Document edits from an extension and the Undo stack #4313

Closed

Description

@stkb
  • VSCode Version: 0.10.11, 10.10 & 10.8
  • OS Version: Win 8.1

Steps to Reproduce:

  1. In a document, type some text.
  2. Invoke a command from an extension that makes an edit to the document. (With TextEditor.edit())
  3. Press ctrl+z to undo

Would expect steps 1 & 2 to produce separate entries in the undo stack: the edit from (2) to be undone, and the text edit in (1) only with a further undo.
However the undo removes both the edit from (2) and the text from (1)

If, in between steps 1 & 2, you move the text cursor, then 2 separate entries to the undo stack are created, as expected.

Can provide a sample extension if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

verified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions