microsoft / vscode

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

Unable to select removed lines in diff viewer #205365

Closed Svish closed 8 months ago

Svish commented 8 months ago

Type: Bug

  1. Have a file with added and removed lines in its git history.
  2. Open the diff viewer, which will show red and green sections in the file for removed and added lines.
  3. Try to select text from the green sections, it's allowed and works fine
  4. Try to select text from the red sections, it's blocked and only gives a popup asking to copy a single changed line or all changed lines.

Often times I need to copy removed code back, but I rarely need to copy full blocks, especially since those blocks often times don't match up properly with what I actually need to copy.

VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:40:56.878Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.81GB (11.20GB free)| |Process Argv|--crash-reporter-id 47d2206c-d1f8-40a4-b941-509da096d920| |Screen Reader|no| |VM|0%|
Extensions (25) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 multi-cursor-case-preserve|Car|1.0.5 vscode-eslint|dba|2.4.4 githistory|don|0.6.20 xml|Dot|2.5.1 EditorConfig|Edi|0.16.4 vsc-material-theme|Equ|33.2.0 prettier-vscode|esb|10.1.0 copilot|Git|1.162.0 copilot-chat|Git|0.12.2 vscode-text-pastry|jkj|1.3.1 svg|joc|1.5.3 ecdc|mit|1.8.0 csharp|ms-|2.15.30 vscode-dotnet-runtime|ms-|2.0.1 playwright|ms-|1.0.22 vsliveshare|ms-|1.0.5905 abracadabra|nic|9.1.1 cssvar|pho|2.6.4 material-icon-theme|PKi|4.33.0 lorem-ipsum|Tyr|1.3.1 sort-lines|Tyr|1.11.0 vscode-mdx|uni|1.7.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaat:30438848 c4g48928:30535728 azure-dev_surveyonecf:30548226 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 pydisww1:30959800 b5d27386:30958190 a89i1917:30961429 7j2b6412:30964151 e3gdj431:30958358 ccp2r3:30958157 ```
gjsjohnmurray commented 8 months ago

Are your diffs using side-by-side presentation (the default) or inline? The relevant setting is diffEditor.renderSideBySide

Svish commented 8 months ago

Are your diffs using side-by-side presentation (the default) or inline? The relevant setting is diffEditor.renderSideBySide

Inline, side-by-side takes up way too much screen space.

gjsjohnmurray commented 8 months ago

/duplicate of #8226

vscodenpa commented 8 months ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!