Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`Main menu > View > Collapse Level > N` works only for the first level for Python scripts #4633

Closed
8day opened this issue Jul 4, 2018 · 6 comments
Labels
Milestone

Comments

@8day
Copy link

@8day 8day commented Jul 4, 2018

Steps to Reproduce the Issue

  1. open Python file with multiple levels of indentation;
  2. go to Main menu > View > Collapse Level > 2.

Expected Behavior

Blocks at 2nd level should've been collapsed.

Actual Behavior

Nothing happens.

Debug Information

Notepad++ v7.5.7   (64-bit)
Build time : Jun 29 2018 - 00:53:58
Path : c:\path\npp\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 7 (64-bit)
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll 

Folding markers are present, and you can fold manually, but not automatically.

@SinghRajenM

This comment has been minimized.

Copy link
Contributor

@SinghRajenM SinghRajenM commented Jul 5, 2018

Please provide debug info.....

However, it is working fine for me.
image

@8day

This comment has been minimized.

Copy link
Author

@8day 8day commented Jul 5, 2018

Sorry, I was mistaken: this feature doesn't work only in Python. See updates in first post.

@8day 8day changed the title `Main menu > View > Collapse Level > N` works only for the first level `Main menu > View > Collapse Level > N` works only for the first level for Python scripts Jul 5, 2018
@cmeriaux

This comment has been minimized.

Copy link
Contributor

@cmeriaux cmeriaux commented Jul 5, 2018

In the python lexer, a level equals the total number of space. Example with a 4 spaces indentation, the 1rst level of indentation equals de 4th level of folding.
I've reported the issue to the python lexer author but I refused to fixe it because the indentation type can be mixed on the same file. It's strange but possible.

@8day

This comment has been minimized.

Copy link
Author

@8day 8day commented Jul 6, 2018

It seems that you are only partially, but mostly right. It seems that that lexer ignores \t and detects indentation only for , which makes it even more horrible. IMO \t with configurable 'width' would've been much better, almost perfect solution for this issue.

@cmeriaux

This comment has been minimized.

Copy link
Contributor

@cmeriaux cmeriaux commented Jul 6, 2018

@8day here is a thread about that with the lexer author
https://sourceforge.net/p/scintilla/bugs/1834/

@zufuliu

This comment has been minimized.

Copy link
Contributor

@zufuliu zufuliu commented Jun 22, 2019

This was fixed by PR #5131.

@donho donho added this to the 7.x (master) milestone Jun 22, 2019
@donho donho closed this Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.