Closed marcobarilari closed 2 years ago
Yup I tried to fix this but because the function is recursive it ended also skipping a million lines in the middle of the output. Dirty hack in CPP SPM was creating a new function called unfoldStruct that calls unfold and adds a line after.
yep, likewise. I tried but it was skipping lines
Actually need to check but it should be doable to check the status of the call stack and only print an extra line if the unfold is the last function on the stack... Not sure if I am talking English here...
No, it is clear, this is a devil function that calls itself
I think I fixed it with this at the end of the function:
callStack = dbstack();
if numel(callStack) > 1 && ~strcmp(callStack(2).name, mfilename())
fprintf('\n');
elseif numel(callStack) == 1 && strcmp(callStack(1).name, mfilename())
fprintf('\n');
end
Is there an existing issue for this?
Expected Behavior
Current Behavior
Error message
No error message, just esthetics
Environment
Anything else?
Writing this here but it is valid for any repo with unfold that btw it is amazing :)