question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[typescript] removing a bracket loses all folded areas

See original GitHub issue

TS Template added by @mjbvz

TypeScript Version: 4.1.0-dev.20201002

Search Terms

  • folding / folds
  • getOutlineSpans

(see my comment for a self contained example)


  • VSCode Version: 1.47.0
  • OS Version: Windows 10 Verison 1909

Steps to Reproduce:

  1. make an error on the code with all lines collapsed.
  2. It will automatically expand all the codes. Which is annoying. Bcuz I have to collapse it automatically.

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vscodebot[bot]commented, Aug 30, 2020
0reactions
andrewbranchcommented, Oct 7, 2020

Maybe if a change results in both 1) the removal of a folding range that’s currently folded, and 2) a syntax error that intersects that range, you could leave it intact? Not sure if you’d have to throw out our entire response of new folding ranges or if it would sometimes be possible to merge them. When you request folding ranges, do you already have syntactic diagnostics? The immediate problem I see with calculating all this on our side is that by the time you ask for new folding ranges, we no longer know what the old ones are (not to mention, we don’t know what regions have been folded, and all this is irrelevant if the user isn’t folding anything).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I collapse sections of code in Visual Studio Code for ...
Fold All folds all regions in the editor: Ctrl + K , Ctrl + 0 (zero) on Windows and Linux; ⌘ + K...
Read more >
Collapse and expand regions of code - Visual Studio (Windows)
If some regions are expanded and some collapsed, then the collapsed regions are expanded. Stop Outlining, (Ctrl+M, Ctrl+P) - Removes all ...
Read more >
User and Workspace Settings - Visual Studio Code
Once the file is open in an editor, delete everything between the two curly ... the editor should remove adjacent closing quotes or...
Read more >
How To Remove A Loose Bracket - YouTube
Take bracket off wire · How to handle orthodontic emergencies at home · The BEST Way to Remove Braces With Photoshop · Orthodontic...
Read more >
Broken Braces? What to do if a Bracket or Wire Breaks (Don't ...
When your braces wire bends, the loose bands can't pull teeth into position. If you notice any changes with the wire being loose,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found