Skip to content

Bug at code folding of code cells  #14730

Closed
spyder-ide/pyls-spyder
#18
@jbund256

Description

Problem Description

When I fold cole cells or subcells, the initator line, i.e. the line beginning with # %%, of the next code cell is folded as well. Thus the title of the next code cell is vanished.

What steps reproduce the problem?

  1. Open a python file in Spyder
  2. Create two code cells with # %% title
  3. Fold the first code cell.
# %% Title 1

a = 1
b = 2

# %% Title 2

What is the expected output? What do you see instead?

I see that the title of the second code cell is vanished. I would expect that the title of the second code cell does not vanish. Ideally, if there is a blank line before the second code cell, after folding the first code cell the blank line should remain there and should not be folded (for better readability).

Versions

  • Spyder version: 4.2.1
  • Python version: 3.8.5
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10 Pro/ Version 20H2

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions