Given a multi-line docstring like this:
"""This is my
docstring.
"""
the folded docstring text becomes docstring, rather than This is my.
This behavior is caused by lines 21-23 from autoload/pymode/folding.vim (added in commit fce811d), but simply removing them breaks docstrings like this:
"""
This is my docstring.
"""
which will instead show an empty fold text.
A simple fix I've found is to replace line 21 with if getline(fs) =~ s:doc_end_regex, since this handles the case where the first line is blank - but that does assume the fold won't start with a single-line docstring, and I'm not sufficiently acquainted with the folding stuff to be sure that this won't ever be the case.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Given a multi-line docstring like this:
the folded docstring text becomes
docstring, rather thanThis is my.This behavior is caused by lines 21-23 from autoload/pymode/folding.vim (added in commit fce811d), but simply removing them breaks docstrings like this:
which will instead show an empty fold text.
A simple fix I've found is to replace line 21 with
if getline(fs) =~ s:doc_end_regex, since this handles the case where the first line is blank - but that does assume the fold won't start with a single-line docstring, and I'm not sufficiently acquainted with the folding stuff to be sure that this won't ever be the case.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.