microsoft / azure-pipelines-vscode

VS Code extension for working with Azure Pipelines YAML files
MIT License
162 stars 101 forks source link

pasting tasks/list items always indent improperly #589

Open burtonrodman opened 3 weeks ago

burtonrodman commented 3 weeks ago

Type: Bug

  1. create an azure-pipelines.yml file
  2. make sure it's Language Mode is Azure Pipelines
  3. add the following steps section and child task:
    steps:
    - task: UseDotNet@2
    displayName: 'Use .NET Core sdk'
    inputs:
    packageType: sdk
    version: 6.0.x
    installationPath: $(Agent.ToolsDirectory)/dotnet
  4. copy the entire task (by selecting lines 2-7)
  5. insert a new line at the end (NOTE the indent is forced in and you have to backspace)
  6. paste the task - NOTE the task is indented by 2 tabs, and the remaining lines are indented by 1 extra tab
steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    packageType: sdk
    version: 6.0.x
    installationPath: $(Agent.ToolsDirectory)/dotnet

    - task: UseDotNet@2
    displayName: 'Use .NET Core sdk'
    inputs:
      packageType: sdk
      version: 6.0.x
      installationPath: $(Agent.ToolsDirectory)/dotnet

This only occurs when the Language Mode is Azure Pipelines (not YAML) This occurs for any list item (YAML array elements).

Extension version: 1.228.0 VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:01:24.262Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i9-13900H (20 x 2995)| |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.59GB (7.58GB free)| |Process Argv|--crash-reporter-id c8e3650d-a133-42e9-901c-3aa8e8465629| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelc:31048052 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 legacy_priority:31077528 ```
burtonrodman commented 3 weeks ago

EXPECTED: