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

[folding] clicking on on line number of folded line should select full folding range #59657

Open
cnshenj opened this issue Sep 28, 2018 · 7 comments
Assignees
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@cnshenj
Copy link

cnshenj commented Sep 28, 2018

Issue Type: Bug

  1. Fold an area (e.g. a block in JSON) to a line
  2. Click the margin of the folded line
  3. Try to drag the mouse to select the whole folded area

Expected:
Can select (only) the whole folded area

Actual:
It's either the first line of folded area, or the whole folded area and next line.

Other editors do not have this problem, but the solutions are different:

  • Visual Studio: The whole folded area is selected when you click the margin
  • Sublime Text: When you drag down, it expands the selection from first line to the whole folded area. If you keep dragging, it will expand the selection to include next line.

Workaround:
Click the beginning of the folded line, drag to the beginning of the next line. It works, but requires much more mouse precision than clicking/dragging in margin area.

Suggestion:
A simple question: how often do you want to select only the first line when you click the margin of folded area? I believe it's very rare, so Visual Studio's solution is desired.

VS Code version: Code 1.27.2 (f46c4c4, 2018-09-12T16:17:45.060Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz (8 x 3096)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: unavailable_off
Memory (System) 15.85GB (4.97GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe D:\Repos\modern\NovaApi
Screen Reader no
VM 0%
@vscodebot
Copy link

vscodebot bot commented Sep 28, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@cnshenj cnshenj changed the title Can't select folded area using margin and mouse Can't select folded area using margin and mouse easily Sep 28, 2018
@vscodebot vscodebot bot added editor editor-folding Editor code folding issues labels Sep 28, 2018
@aeschli
Copy link
Contributor

aeschli commented Oct 2, 2018

To select a folded range is not really difficult. Place cursor at the beginning of the line with the folding marker, press Shift+down.

But I can look into selecting the full range when clinking on the the line number.

@aeschli aeschli changed the title Can't select folded area using margin and mouse easily clicking on on line number of folded line should select full folding range Oct 2, 2018
@aeschli aeschli added the feature-request Request for new features or functionality label Oct 2, 2018
@aeschli aeschli added this to the Backlog milestone Oct 2, 2018
@alexdima alexdima removed the editor label Oct 8, 2018
@aeschli aeschli changed the title clicking on on line number of folded line should select full folding range [folding] clicking on on line number of folded line should select full folding range Oct 12, 2018
@dubeg
Copy link

dubeg commented Oct 13, 2018

Just to add some info, SublimeText makes the "folded character indicator" selectable, so that we can easily select it to select the folded region. It is also useful when selecting a region with the mouse.

@jasonslyvia
Copy link

another useful case is to delete a whole block of dead code, really looking forwarding to have this feature implemented, cheers.

@haideralsh
Copy link

haideralsh commented May 27, 2021

Adding my vote to this one too! I often find myself folding code to delete it since it's very intuitive then be disappointed when only one line gets deleted:

collapsed-block-delete

@aeschli aeschli added the help wanted Issues identified as good community contribution opportunities label May 27, 2021
@ldsouza93
Copy link

I'd really like to have this feature too, much easier to work with ctrl+shift+k (delete line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

7 participants