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

label-mode (Vim 7.4.791 or older): 'foldmethod' sometimes not restored #197

Open
hardenedapple opened this issue Mar 10, 2017 · 1 comment
Labels

Comments

@hardenedapple
Copy link

Hi there,

When the fix for #186 acts (i.e. when sneak-streak is activated in a buffer that has foldmethod=syntax), it stores "syntax" in s:fdm_orig in the s:before() function.
This is unconditionally restored in s:after() so that any buffer where you run sneak-streak after this has happened will have its foldmethod set to "syntax".

repo:

# Open a large buffer
vim src/nvim/fold.c
:set foldmethod=syntax
snvd
:vert help help
:set foldmethod=manual
swid
:set foldmethod?

I guess this could either be fixed by unconditionally setting s:fdm_orig to &l:foldmethod in s:before() or by putting a condition on setting foldmethod in s:after().

@justinmk justinmk added the bug label May 22, 2017
@justinmk
Copy link
Owner

FWIW this shouldn't happen with Vim 7.4.792 or Nvim 0.2 since c2cbcf7

But it still needs to be fixed for older versions.

@justinmk justinmk changed the title Fix for #186 sometimes sets foldmethod when it shouldn't 'foldmethod' sometimes not restored (Vim 7.4.791 or older) Aug 29, 2018
@justinmk justinmk changed the title 'foldmethod' sometimes not restored (Vim 7.4.791 or older) label-mode (Vim 7.4.791 or older): 'foldmethod' sometimes not restored Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants