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

Foldmethod is not reset after :Diffoff #39

Open
savchenko opened this issue Nov 28, 2024 · 1 comment
Open

Foldmethod is not reset after :Diffoff #39

savchenko opened this issue Nov 28, 2024 · 1 comment

Comments

@savchenko
Copy link

After executing :Diffoff, foldmethod stays at diff. Can be reproduced as following:

  1. Open two files in vertical splits, have foldmethod set to marker
  2. Switch to visual mode, select lines in both
  3. :Diffthis
  4. Execute :Diffoff in both splits
  5. :set foldmethod?

On the side-note, I would be handy to have single command that exits the diff mode and restores the window layout back to what it was.

Tested on nvim v0.10.2

@rickhowe
Copy link
Owner

rickhowe commented Nov 29, 2024

I tried but can not reproduce it on my nvim 0.10.2.

I think you are talking about spotdiff.vim, right?
If the undocumented DiffRangeView variable includes f, Diffthis sets the option to manual and Diffoff returns it back to the original. It works fine.

Does vim original diffthis and diffoff have the same problem?

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