Skip to content

When a file is modified by extensions , it loses the undo history. #19800

Closed

Description

  • VSCode Version: 1.9
  • OS Version: Linux

Steps to Reproduce:

  1. install vscode-prettydiff from extension market place.
  2. made some changes to a file.
  3. run it to beautify the file. Ctrl + Shift + P : Prettify using Prettydiff

Source :

https://github.com/HexcodeTechnologies/vscode-prettydiff/blob/master/extension.js
I do believe extensions should not discard undo history.

Activity

  1. bpasero commented on Feb 3, 2017

    @bpasero
    Contributor

    This is not how we recommend extensions to modify a text buffer. There is proper API to modify text documents and those should be used.

    Please file this as bug to the extension you are using.

  2. added
    *caused-by-extension
    on Feb 3, 2017
  3. v3ss0n commented on Feb 3, 2017

    @v3ss0n
    Author

    I am extension developer of that.
    Thats means external applications modifying the document are supposed to discard Undo History?
    That is not right. That is a bug.

  4. bpasero commented on Feb 3, 2017

    @bpasero
    Contributor

    Phyo Arkar Lwin (@v3ss0n) why can you not express your edit via the text document API? what happens if the file is dirty in the editor, you just write to disk? that is a bad behaving extension 👎

  5. v3ss0n commented on Feb 3, 2017

    @v3ss0n
    Author

    I just started my first extension and reported a Bug , still it is a bug since Undo History should not be lost. Why Microsoft developers so toxic ? This is not once such noob blaming/shaming behavior is spotted on Opensource software repos by MS Employees. you can just Kindly point to the correct API or Example.

  6. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *caused-by-extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions