Skip to content

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

@hardenedapple

Description

@hardenedapple

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions