Skip to content

Bad text display for folded multi-line docstrings #560

Closed

Description

@Pidgeot

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.

Activity

  1. mgeier commented on Oct 31, 2015

    @mgeier

    This seems to be working now in the current master.

  2. mgeier commented on Oct 31, 2015

    @mgeier

    I guess this was fixed in #533.

  3. stale commented on Feb 13, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  4. stale commented on Mar 6, 2018

    @stale

    Closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions