microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.69k forks source link

[folding] folding indicators missing for folded code #75726

Open FBLANCOCOOGRANDA opened 5 years ago

FBLANCOCOOGRANDA commented 5 years ago

Issue Type: Bug

For some time the visual studio code has been blocked, it does not display the fragments of code.

Suppose I have a code fragment inside an if, when it is blocked accessing this code inside the if is impossible, it is necessary to close the visual code and re-enter sometimes it happens up to 10 times in the day

image

access the points marked with the red arrow when it is blocked you can not

In this image you can see how the code can not be accessed

image

VS Code version: Code 1.35.1 (c7d83e57cd18f18026a8162d042843bda1bcf21f, 2019-06-12T14:30:02.622Z) OS version: Windows_NT x64 10.0.17134

Extensions (18) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 bracket-pair-colorizer|Coe|1.0.61 angular2-snippets|dan|1.0.21 githistory|don|0.4.6 vscode-html-css|ecm|0.2.0 tslint|eg2|1.0.43 auto-close-tag|for|0.5.6 auto-rename-tag|for|0.1.0 Angular2|joh|8.1.1 vscode-extension-auto-import|mop|1.3.3 vscode-language-pack-es|MS-|1.35.1 atom-keybindings|ms-|3.0.6 csharp|ms-|1.20.0 powershell|ms-|2019.5.0 al-formatter|ras|3.0.0 vscode-icons|vsc|8.7.0 JavaScriptSnippets|xab|1.7.2 tslint-snippets|zuo|1.1.0
aeschli commented 5 years ago

Very strange... What about the folding indicators (+, -) next to the line number? What about changing the settings: editor.folding, editor.showFoldingControls ?

jrskerrett commented 5 years ago

I also have this issue. I'm using 1.35.1. I like to use the keyboard shortcuts. Sometimes, after using them, I won't be able to unfold the code. It's a sporadic issue. Sometimes it resolves itself after a few minutes. Other times I have to restart VS Code.

cskn1097 commented 2 years ago

Any solution for this?

TaykhoomDalal commented 2 years ago

I am also having this issue. This happens almost every single time I open a python file in the VSCode editor. The only solution (temporary) I have found is to restart VSCode (however after a few minutes of use, the arrows to unfold/fold the code disappear). I have enabled editor.folding and editor.showFoldingControls is set to always. I have also tried using the keyboard shortcuts but they don't work. When I try placing the cursor after the functions that are folded (and that I can't unfold), and deleting, it deletes code inside the function but does not unfold it (I can tell its deleting because the line numbers decrease).

Note: I am using VSCode to connect to a remote server (cluster)

Extensions: Pylance: v2022.7.20 GitHub Copilot: v1.31.6194 Excel Viewer: v4.2.55 Python: v2022.10.0 R: v2.5.0 Jupyter: v2022.6.1001902341 Jupyter Notebook Renderers: v1.0.8 Jupyter Keymap: v1.0.0

VSCode Version: 1.69.0 OS: Windows_NT x64 10.0.19043

MaelAbgrall commented 2 years ago

Same issue, I'm on a remote VueJS project.

Although, I have a second instance of VScode with a python project on the same remote server, and the issue is not present

VS code v1.69.0 Host: Microsoft Windows [Version 10.0.19044.1806] Remote Linux: Ubuntu 20.04.2; Kernel 5.4.0-107-generic

hxzhao527 commented 2 years ago

Same issue

vscode version

Version: 1.69.2
Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
Date: 2022-07-18T16:32:39.000Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 21.6.0

other information

I think it is a problem about extension.

After disable ext(vscode-go), folding revocerd.

ershov commented 2 years ago

Same issue here. I use code folding a lot in vim but in vscode it's virtually impossible to use. Not only folding controls disappear - hotkeys don't work either. It happens in any language. I use it in remote mode over ssh.

izkasi commented 2 years ago

Can confirm this:

Version: 1.70.1
Commit: 6d9b74a70ca9c7733b29f0456fd8195364076dda
Date: 2022-08-10T06:08:46.959Z (1 day ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 21.6.0

Will observe projects/used extensions.

mfiro commented 1 year ago

I have the same issue with python files in vscode. Disabling juypter extensions solves the issue however.

Version: 1.73.1 Commit: 6261075646f055b99068d3688932416f2346dd3b Date: 2022-11-09T03:54:53.913Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Linux x64 5.15.0-56-generic Sandboxed: No

isort ms- 2022.8.0
python ms- 2022.18.2
jupyter ms- 2022.9.1303220346
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.12
vscode-jupyter-cell-tags ms- 0.1.6
vscode-jupyter-slideshow ms- 0.1.5
cpptools ms- 1.12.4
LiveServer rit 5.7.9
ayu tea 1.0.5
vttrifonov commented 1 year ago

I hate to pile on this but I have been having this issue too. I work with Python/Jupyter and the code folding buttons are mysterious. Most of the time they are there and work fine but every now and then when I start VSCode they are missing. A combination of reloading window, restarting, and just time passing and they appear. A tiny kink but a nuisance nonetheless. It looks like something is loading in the background to make them appear but every now and then it fails silently and the buttons do not appear... I have a proof of this but the margin is too small to fit :-)

Just now I am on the third restart and they still do not appear. I am also working connected to a remote which might be slowing the mysterious code folding load.

ChocolateVS commented 1 year ago

very much an issue for me in js, i've tried re-installing vs code to no avail

It will work for the first few 20 (ish) seconds before it stops and all code folding functions don't work. If i fold a block of code before it happens i cannot unfold