[Bug] Counter Intuitive Folds with ifs and elseifs

I noticed that there is a misleading visualization of folds or closed blocks of a function or brick of code.

Using this little block of code here as an example, this is why the folds are counter intuitive:

It’s very simple, closing the fold on line 7 results in this:

This is an issue because in that above screenshot, the top if statement appears to have no end, but that’s not all. The true chaos is here:

Due to (if x == true then)'s true end being well, hijacked by the elseif, the (if x == true then) proceeds to ‘hijack’ the (if z == true then)'s end, repeating the entire misleading issues. Remember that this does not effect the code itself, but just makes it strange visually. I do not recall it being like this, and it seems extremely broken, so that’s why I assume it’s a bug.

If there are answers, reasons, elaborations or even “hey this doesn’t happen to me, its just you” then please let me know.

1 Like

This topic was automatically closed after 1 minute. New replies are no longer allowed.