Skip to content

Hidden lines doesn't work with code folding #13682

@cynthplusplus

Description

@cynthplusplus

Description of the Issue

The View menu's Hide Lines feature incorrectly opens lines that are inside a folded section.

Steps to Reproduce the Issue

  1. Select C++ from the Language->C->C++ menu.
  2. Copy the following code:
for (int i = 0; i < n; ++i)
{
  // blah blah
  // HIDE LINE 1
  // HIDE LINE 2
  // HIDE LINE 3
  for (int j = 0; j < n; ++j)
  {
    // 
    // HIDE START
    // HIDE BLOCK
    
  }
  
  // HIDE END
  
}
  1. Hide lines from the HIDE START comment to the HIDE END comment (via View Menu or alt+h), as follows:
hide fold step 1 hide fold step 2
  1. Fold the for block by clicking on the red minus sign as follows:
hide fold step 3
  1. Open the hidden lines by clicking on the green close marker on line 16:
hide fold step 4

Expected Behavior

Lines 10-15 should remain hidden.

Actual Behavior

Lines 10-15 are visible.

Debug Information

Notepad++ v8.1.9.3 (32-bit)
Build time : Dec 6 2021 - 19:16:45
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 22621.1702
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
Notepad++ v8.1.9.3 (32-bit)
Build time : Dec 6 2021 - 19:16:45
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 22621.1702
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

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