vscode-matlab icon indicating copy to clipboard operation
vscode-matlab copied to clipboard

if, else, end one liners disrupt the outline

Open SiFreZi opened this issue 2 years ago • 1 comments

Hello,

function printNice(param)
    if param; disp('true'); else; disp('false'); end
    cmd = '@echo nice';
    dos(cmd);
end

produces a wrong outline: image

else and cmd are shown outside the function.

Regards, Simon

SiFreZi avatar Mar 07 '22 09:03 SiFreZi

Ouch will have to disable folds in vscode-textmate-languageservice when they are on the same line.

ghost avatar Mar 18 '22 23:03 ghost

This one wasn't as critical as the other perf issues, but I spent some time and sketched out a fold algorithm that could handle the issue. It'll be fixed when the pull is merged 😃

zm-cttae-archive avatar Jan 28 '23 00:01 zm-cttae-archive

FWIW I also killed the ability to generate multiple symbols per line.
The VS Code team made a design decision to accept the first keyword token per line as the only important one.

zm-cttae-archive avatar Feb 26 '23 10:02 zm-cttae-archive