You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to #50840 , but does not require supporting multiple folding ranges within the same line. Rather, this request is to accept character positions referring to the first and last lines of existing line-granular folding ranges, used only for the purpose of composing the fold text.
Our provider folds blocks down to a single line. For example:
if (b)
{
}
if (b) {
}
do {
int i;
} while (b);
{
}
Currently fold down to:
if (b)...
if (b) {...
do {...
{...
Note that some syntax can lead to omitting code that wasn't intended to be folded, or showing unmatched braces.
We also have an issue due to the fact that a range may start or end in the middle of a line. For example:
if (b) { int i;
} else {
}
{
int j; } int k;
Folds into:
if (b) { int i;...
}
{...
Suggestion: accept start and end character positions for the folded range, and use them to infer the appropriate text to display before and after the fold. For example:
if (b) { int i;
int i;
int k; } // comment
For the above, we would provide a range of lines 0-2 (all of it), but would indicate start position 8 and end position 7. VS Code could use this info, and existing colorization information, to build the fold text:
if (b) {...} // comment
Similarly, it would clean up:
do {
int i;
int kj; } while (b);
Such that it's displayed as:
do {...} while (b);
The text was updated successfully, but these errors were encountered:
This is similar to #50840 , but does not require supporting multiple folding ranges within the same line. Rather, this request is to accept character positions referring to the first and last lines of existing line-granular folding ranges, used only for the purpose of composing the fold text.
Our provider folds blocks down to a single line. For example:
Currently fold down to:
Note that some syntax can lead to omitting code that wasn't intended to be folded, or showing unmatched braces.
We also have an issue due to the fact that a range may start or end in the middle of a line. For example:
Folds into:
Suggestion: accept start and end character positions for the folded range, and use them to infer the appropriate text to display before and after the fold. For example:
For the above, we would provide a range of lines 0-2 (all of it), but would indicate start position 8 and end position 7. VS Code could use this info, and existing colorization information, to build the fold text:
Similarly, it would clean up:
Such that it's displayed as:
The text was updated successfully, but these errors were encountered: