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

Folding issue with [[...]] string #23

Open
mrupp12bit opened this issue Oct 6, 2021 · 0 comments
Open

Folding issue with [[...]] string #23

mrupp12bit opened this issue Oct 6, 2021 · 0 comments

Comments

@mrupp12bit
Copy link

mrupp12bit commented Oct 6, 2021

The extension has great folding capabilities, like using ;region - ;endregion, but also every Function - EndFunction, If - EndIf, While - Wend, etc. can be folded. This is only mentioned in the description of the extension with a simple "Code folding" entry, which doesn't really do this great feature any justice, but this only as a side note ;-)

It's also possible to fold strings following the [[...]] notation, but here I think I encountered a small bug:
Example 1 works perfectly fine:
image
folded:
image

Example 2 works almost perfectly fine, except that the empty line between the two assignments probably should not vanish when folded (well, this is really a minor one and not really important):
image
folded:
image

Example 3: The thing with [[...]] strings is, that they include all linebreaks and spaced (similar to < pre > in HTML), so it's realistic that following lines could be without indentation. And this is the bug I mentioned:
image
folded:
image

  • Folding the Function folds it to the 2nd line of the string assignment.
  • Folding the [[...]] string folds until EndFunction

I assume folding orients itself at the code indentation, which can easily be broken when using [[...]] string.
Maybe it's possible to somehow ignore "indentation breaks" caused by [[...]]?

Cheers,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant