Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent code folding, cursor and screen positions in VSCode #189610

Closed
bproxauf opened this issue Aug 4, 2023 · 5 comments
Closed

Persistent code folding, cursor and screen positions in VSCode #189610

bproxauf opened this issue Aug 4, 2023 · 5 comments
Assignees

Comments

@bproxauf
Copy link

bproxauf commented Aug 4, 2023

When I open a .py file in VSCode Portable 1.79.2, fold any defined functions, close VSCode and open the same file again, the folded code blocks appear unfolded. Similarly, when I scroll to anywhere below the beginning of the file and set the cursor there, both the cursor position and the screen position (as in which part of the file is shown on the screen) are reset to the beginning (for the cursor first character) of the file. This is impractical when you are working on code not at the beginning of the file over multiple VSCode sessions.

The code folding issue, raised previously by another user under #169270, was closed due to lack of information, therefore I am raising a new issue.

@starball5
Copy link

Related on Stack Overflow: VSCode Portable disable auto-expansion of folded blocks

@Kycko
Copy link

Kycko commented Nov 23, 2023

+1
I'm working with JavaScript files and I see all the code unfolded after VS Code restart. 😐

@aeschli
Copy link
Contributor

aeschli commented Dec 18, 2023

I tried to reproduce

  • VS Code 1.85.1 in portable mode (on Linux)
  • a simple python file with all functions folded
  • close VS Code and reopen. Functions are still folded
  • I also tried to with the Python extension installed, no difference

Make sure the data folder is writable. You should see files written in data/user-data/User/workspaceStorage. That's where editor state is stored.

@aeschli aeschli closed this as completed Dec 18, 2023
@Kycko
Copy link

Kycko commented Jan 19, 2024

Oh guys, I've found the problem.
Checked my third-party extentions, disabled Explicit folding and folding state is OK now after app restart.

@Kycko
Copy link

Kycko commented Jan 19, 2024

Tried another extention and have the same issue. Anyone know the way to solve (I need the ending brackets folding)?

@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants