masukomi / vim-markdown-folding

Fold markdown documents by section.
248 stars 43 forks source link

Folds open when adding dashed list items #45

Open zplizzi opened 2 years ago

zplizzi commented 2 years ago

When adding a new row to a dashed list, the sibling folds of the current fold open. I would expect folds to stay unchanged.

Here's a demo: https://www.loom.com/share/61c7cb4af99d46bf991322bd202db109. In the demo I'm just adding a new row (starting with o to add a new line, then just typing - hi).

Does anyone else have this problem or know how I can address it? Possibly it's interference with something else in my vimrc.

Here's the sample text from that demo:

# Level 0

## level 1

### level 2

lorem ipsum
- asdf
- hi

### more stuff

lorem ipsum

### more stuff

lorem ipsum
anthony-geoghegan commented 1 year ago

For what it's worth, I wasn't able to reproduce this.

zplizzi commented 1 year ago

Thanks for testing! I stripped down my vimrc and discovered that it only happens when using "Nested" folding mode. Ie after calling :FoldToggle in a markdown file. Does it reproduce for you in this mode?