Skip to content

evil-mode fails to open folds correctly in deeply nested outline/org headers #1986

@jamescherti

Description

@jamescherti

When using evil-mode in outline-mode or org-mode, attempting to open folded sections (zo) does not work as expected when the cursor is positioned inside a deeply nested header.

Steps to Reproduce:

  1. Enable evil-mode.

  2. Open an org file or an outline-mode buffer with multiple nested headers, for example:

Level 1
** Level 2
*** Level 3
**** Level 4: A
Some content here
Some content here
Some content here
Some content here
**** Level 4: B
Some content here
Some content here
Some content here
Some content here
**** Level 4: C
Some content here
Some content here < PUT THE CURSOR HERE
Some content here
Some content here
**** Level 4: D
Some content here
Some content here
Some content here
Some content here
Some content here
**** Level 4: E
Some content here
Some content here
Some content here
  1. Put the cursor in < PUT THE CURSOR HERE

  2. Collapse all folds with zM

  3. Press zo to open the fold

  4. The folds fail to expand fully in nested hierarchies, leaving all content hidden except for level 4: C.

Image

Environment:

  • Emacs version: 30.2
  • evil version: 1.14.2
  • Operating system: Linux and macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions