Skip to content
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

How to edit files on the right side when using DiffviewOpen origin/master...HEAD #527

Open
kanishkave opened this issue Aug 29, 2024 · 1 comment

Comments

@kanishkave
Copy link

Hey,
Thank you for the great plugin and i apologize if this question has already been asked but
say for example i open DiffViewOpen origin/master...

this shows me all the changes on my branch.
now if i want to undo some changes I Just want to go to the right side file panel and make my changes but then it says modifiable is off which makes sense.
So I use to go to the file and then make my changes. now when i come back the diff view doesn't update and it still shows up the original change which I just undid. Do you understand what I am saying?

Screenshots:

image

now if i go to main.py and undo the print statement
image

it still shows up as if i still have it
image

is there a way i can get diff between origin/master and current uncommitted changes?
thank you for your help

@Kortantic
Copy link

Little late to the party here. Hope you figured it out! Here's how it's done, for anybody else looking.
This will allow you to edit the local file directly in the right window, with LSP assistance (if you have it set up).
Use :DiffviewOpen origin/master...HEAD --imply-local
You can set it to default to the behavior by adding this to the Diffview config:
default_args = { DiffviewOpen = { "--imply-local" }, },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants