microsoft / vscode

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

Inline diff is at wrong position #218939

Open M393 opened 3 months ago

M393 commented 3 months ago

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

Steps to Reproduce: image

Preconditions:

  1. Click the little red inline diff marker
  2. The diff is placed in the middle of wrapped line 1 (see screenshot)

It should be placed directly above line 2 instead.

hediet commented 3 months ago

Can you share the content of the two models that you diff? Thanks!

M393 commented 3 months ago

Put this in a file and stage it with git add $file

line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1
line 2
line 3

Delete the second line:

line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1
line 3