microsoft / microsoft/TypeScript

[typescript] removing a bracket loses all folded areas

Open
#40,920 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the self-contained example in the linked issue comment and investigate the TypeScript folding path associated with getOutlineSpans. Reproduce the problem by removing a bracket while code is folded, then trace how the edit affects folding data. Done means existing folded areas remain folded after the edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.