Skip to content

Can't easily comment and collapse top level golang function with blank lines #124104

@jsoref

Description

@jsoref

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

VS Code version: Code 1.56.1 (e713fe9, 2021-05-06T10:08:24.325Z)
OS version: Darwin x64 19.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz (8 x 2500)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 3
Memory (System) 16.00GB (0.09GB free)
Process Argv --crash-reporter-id 1fc67ee2-0174-4598-9f98-4537df0dd32c
Screen Reader no
VM 0%
Extensions (35)
Extension Author (truncated) Version
open-in-macdown Cod 1.0.0
vscode-zonefile Com 0.0.4
vscode-markdownlint Dav 0.40.4
vscode-eslint dba 2.1.20
EditorConfig Edi 0.16.4
prettier-vscode esb 6.4.0
go gol 0.25.0
haskell has 1.4.0
hive-sql jos 0.0.4
language-haskell jus 3.4.0
vscode-sbt-scala lig 0.2.4
hg mrc 1.7.1
vscode-docker ms- 1.12.1
vscode-kubernetes-tools ms- 1.3.2
vscode-postgresql ms- 0.3.0
python ms- 2021.5.842923320
vscode-pylance ms- 2021.5.2
jupyter ms- 2021.6.832593372
cpptools ms- 1.4.0-insiders
vscode-typescript-tslint-plugin ms- 1.3.3
fabric8-analytics red 0.3.3
java red 0.79.1
vscode-commons red 0.0.6
vscode-xml red 0.16.0
vscode-yaml red 0.19.0
preview-vscode sea 2.2.5
html-preview-vscode tht 0.2.5
simple-rst tro 1.0.1
vscodeintellicode Vis 1.2.13
vscode-java-debug vsc 0.33.1
vscode-java-dependency vsc 0.18.3
vscode-java-pack vsc 0.14.0
vscode-java-test vsc 0.29.0
vscode-maven vsc 0.30.1
markdown-all-in-one yzh 3.4.0
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt639:30300192
pythontb:30283811
vspre833:30267464
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553
vscgsv2:30301612
bridgeflight:30299254
vscod805cf:30301675

Steps to Reproduce:

  1. Clone a repository with Go code containing top level functions w/ blank lines
  2. Open the repository and browse to such a file, e.g. https://github.com/nektos/act/blob/38f6dfb49a7e3cee826911e36f0c990813282d28/pkg/runner/runner_test.go#L125-L164
  3. Select the function (e.g. by collapsing it and then selecting it)
  4. Use cmd-/ to comment the function
  5. Select the function (if it isn't)
  6. Try to use the collapse widget in the gutter to collapse it.

image
image
image

I understand the tension between not wanting to comment blank lines and... but this means I can't collapse functions after deciding they aren't relevant to my problem. Instead I'm going to delete each function...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions