Skip to content

Allow to edit the left hand side of a diff editor if possible #4180

Closed

Description

You can hit it by using Compare with action and --diff. This is really sad. The editor on the left should only be read-only if the input behind it is really read-only (coming from the git index, for example).

cc alexandrudima Benjamin Pasero (@bpasero)

Activity

  1. added
    feature-request
    on Mar 14, 2016
  2. bpasero commented on Mar 14, 2016

    @bpasero
    Contributor

    Yes I always wanted that actually :)

  3. alexdima commented on Mar 14, 2016

    @alexdima
    Member

    On my side it would be pretty easy to just comment out the forcing of readOnly=true on the left-hand-side. But I need to add an option to allow the workbench to make the git diff case left-hand-side readOnly.

  4. alexdima commented on Mar 14, 2016

    @alexdima
    Member

    There's also the inline diff case, where I cannot make the "original" editable.

  5. bpasero commented on Mar 14, 2016

    @bpasero
    Contributor

    alexandrudima yeah I think we know in all places if the left hand side should be editable or not, I think it would only be the file-2-file compare where this applies.

  6. alexdima commented on Mar 14, 2016

    @alexdima
    Member

    Ok, there is a new option originalEditable to the diff editor. It is false by default.

  7. bpasero commented on Mar 14, 2016

    @bpasero
    Contributor

    alexandrudima cool, let me pick this up then...

  8. bpasero commented on Mar 14, 2016

    @bpasero
    Contributor

    alexandrudima so by default this option is true or false?

  9. alexdima commented on Mar 14, 2016

    @alexdima
    Member

    :) Wrote in comment and in jsdoc: it is false by default.

  10. bpasero commented on Mar 14, 2016

    @bpasero
    Contributor

    👍

  11. 25 remaining items

  12. Paperalien commented on May 2, 2019

    @Paperalien

    It would be cool to have two buttons in the middle "copy changes from left to right" and vice versa.

    Like this (Eclipse):
    image

    The ability to move code from the original to the new is pretty fundamental in vcs compare tools. I don't think I've ever found a diff tool before that doesn't have it.

  13. tdomhan commented on Jun 17, 2019

    @tdomhan

    "diffEditor.originalEditable": true, works perfectly! Is there any way to make this the new default? I can't imagine ever not wanting this on.

  14. bpasero commented on Nov 19, 2019

    @bpasero
    Contributor

    before (3)

    I pushed a change to enable this by default if the left-hand editor is not readonly. Pressing CtrlCmd+S or File > Save will now save both sides of the diff editor.

    Feedback welcome, it will be in tomorrows insider build: https://code.visualstudio.com/insiders/

  15. added
    verification-needed
    and removed
    verification-needed
    on Nov 19, 2019
  16. jharrang commented on Dec 4, 2019

    @jharrang

    Benjamin Pasero (@bpasero) Thanks for implementing! Now that this is closed, is it possible to finally implement #25887 and #37350? This would address a critically missing piece of editor functionality that has been heavily requested for over two years.

    Also mentioning alexandrudima who has been consolidating a number of issues to #25887

    Thanks much!

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

Metadata

Metadata

Labels

diff-editorfeature-requeston-testplanworkbench-editors

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions