-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to edit the left hand side of a diff editor if possible #4180
Comments
Yes I always wanted that actually :) |
On my side it would be pretty easy to just comment out the forcing of |
There's also the inline diff case, where I cannot make the "original" editable. |
@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. |
Ok, there is a new option |
@alexandrudima cool, let me pick this up then... |
@alexandrudima so by default this option is true or false? |
:) Wrote in comment and in jsdoc: it is false by default. |
👍 |
Hm, I forgot that this adds a bit more complexity to how actions operate on the active editor and how dirty state is indicated. I think I was a bit too optimistic for March but will check. Otherwise April it will be. |
Surprisingly lots of things actually do work in terms of dirty indication but the one for the actual editor does not because it only checks for the right hand side. |
If this something that can be done as a first PR? Would be great if you could indicate issues that would be easy wins for an outsider to contribute. I really really really really want git diffing to work on the right side. I will buy you a coffee/beer if you fix this 😜 |
@nojvek you can always edit on the right hand side when comparing outgoing changes in git! |
(this feature request is about being able to edit either the left hand or the right hand side when comparing 2 files) |
Oh I just saw that after doing an upgrade. This seems fairly recent. This really bought me a lot of joy when it worked. |
It was always possible to edit the right hand side of the diff editor for git changes view. |
Yeah the copy changes is super useful. |
What's also strange (mac here): |
It would be nice if there was read-only on/off control of both sides of the diff editor. In GitLens, when diffing history both sides should be read-only. |
Can someone explain to me where I can set originalEditable ? Really confused. That option is not listed on my settings v1.27.1 |
@duartemolha, open VSCode, open the command palette (on windows it's Ctrl + shift+ P), then type setting and open the Then paste Don't forget to end you line with a |
This setting is just working for the split view. If switched to inline view, i can't even just select (nor copy) the original text. |
would be nice to have that available also in the "ui" version of "settings"
Nice. So Thanks :-) To further enhance this feature, it would be nice if an edited source (left side) could consequently being saved in the "diff-view", that already works for the target-side (right). |
|
I pushed a change to enable this by default if the left-hand editor is not readonly. Pressing Feedback welcome, it will be in tomorrows insider build: https://code.visualstudio.com/insiders/ |
@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! |
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 @bpasero
The text was updated successfully, but these errors were encountered: