UDL folding breaks halfway through the file
-
Sorry for bad formatting, currently on mobile.
Just to note, the file I’m working on isn’t just code, it’s a bit of an all in one tutorial file which has code, comments, etc.
I set up a UDL which had a couple of symbols used to fold big chunks of stuff I don’t always need to see. (Ex. #<, #! to start the fold and #>, #$ to end the fold)
It works fine for about the first third of the file, but then breaks halfway through the file. It also breaks every time I fold and unfold it as well.
Pictures attached:
Initial setup: also tried the symbols I mentioned in the post.
Works fine initially:
Breaks eventually:
-
@ArminRay said in UDL folding breaks halfway through the file:
It works fine for about the first third of the file, but then breaks halfway through the file.
Unfortunately, the UDL folding has never been perfect, and it’s been pointed out to the developer for years: nothing has ever come of such reports (or any of the other feature requests for UDL). We essentially have to live with imperfect folding for UDL, or not use it. (Some of my UDL don’t fold right even near the top of the document, if the first line(s) of the document are a comment. So it might be that a comment somewhere in your file is the culprit for breaking folding. And consider yourself “lucky” that it works for even the first 1/3 of the file.)
If you write a Lexer Plugin, you can define the folding yourself, and it might work better for you than UDL’s built-in folding. But that’s a lot of work, and I doubt you’ll go that far.
(Sorry, there’s not much else I can say. It’s annoying that a much-used feature of Notepad++ has essentially been left to rot, letting people use what works, but ignoring what doesn’t or what could be made better. The best I can do is commiserate with you, because I cannot offer you any hope that the UDL system will ever get better.)