vscode-blockman
vscode-blockman copied to clipboard
N04 Sub05 adds extra whitespace to end of line inside inner block
I noticed that the new option for adding padding on the right also introduces a significant amount of padding inside the inner-most block.
Code:
# hello
for i in range(10):
for j in range(20):
print("Hello world, from ({},{})".format(i,j))
# expand block
count += 1
N04 Sub05 -> 0:

N04 Sub05 -> 4:

I think it might be interacting poorly with N24:

That's because the calculation formula for N04 Sub05 is like this:
rightPaddingIncrement = (maxDepth - currDepth) * minDistanceBetweenRightEdges
It is a fast formula, performance is more optimized with it. If we want more precise formula, then I guess we need to make much more complex and CPU heavy calculations. I think current formula is good enough. I hope it's ok for you.
You mentioned N24, and yeah, it will make some effect on the formula because if you enable round brackets and maybe also square brackets, it means you are creating more blocks. More blocks often means some changes in depth indexes, so it will effect the formula.