-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Diff Inline View is not showing removed code #192957
Comments
This looks to have been fixed in the recent VS Code update, so I'm going to close this issue. |
FYI this has appeared for me now in latest release. The bug does not appear immediately on vscode application launch. Have not noticed any specific action triggering it, but will keep an eye out. Version: 1.83.1 (user setup) |
It looks like something with the view zones is off. The alignment viewzones are missing in the first screenshot. Do you have repro steps? |
Somewhere in the middle of coding VS Code suddenly decides to do this. Closing and reopening VS Code fixes it temporarily until this happens again. That's my current unsophisticated observation. (v1.83.1) |
https://stackoverflow.com/questions/77324073/vscode-is-hiding-removed-lines-from-diffs I've been having this issue too. if you move the diff view or split the view the "new" view shows things correctly. |
Do you have any settings enabled that could cause this? This is certainly a bug, but so far I didn't manage to reproduce |
I have looked around the "diff" & "git" configuration options and could not see anything that popped out as a cause. I don't think I have any changed / non-default configuration tbh, but it's hard to tell. especially since the removed lines DO show up if I move the diff tab into any of the views not the "main"/origin one; and they show up if I then close the origin tabs and let the tab fill the page. but then if I open another tab. |
I have this issue in the latest vscode version |
Happens for me invariably. Here is my version info and settings.json Version: 1.83.1 (Universal)
|
Doesn't work for me. |
Another quick fix/workaround is to run |
Can you check/share the dev tool logs when this happens? I'm using the diff editor daily and so far I didn't see this yet. |
Same just happened for me. In my case it asked if i want to increase the diff time processing (was processing 2 big files), apart from that i haven't done anything unusual. Reloading the window solved for me |
This issue has been a huge problem for me for over a month - especially because I frequent the use of UPDATE: This doesn't solve my issue, this solved an issue, but I think I'm experiencing another unrelated one. |
I faced this issue and updated to It's interesting to note that the first occurrence of this issue happened when I staged a file. Usually the diff in the working tree disappears fully, but this time only the added diff (green) disappeared, where as the deleted diff (red) still remained. I thought that was odd, and checked the diff in the index, and it only contained the added diff (green). I checked PS: When I first noticed it, I incorrectly thought this is some kind of a new feature which hides unnecessary deleted lines 😂 (for example if the line has no deleted chars, only added ones) and went around digging in Settings to turn it off. Apparently, it's a bug and regression. |
@hediet is there a way for one of us to get a dump of the VS Code app diff engine/module/whatever when this happens again? Maybe you can inspect it to see what's going on. 🙂 Logs could be an alternative too. Maybe the diff engine is hitting some errors and silently bypassing them. |
Just ran into this after doing a lot of work in a single session (i.e. the problem did not immediately start occurring). This misbehavior was not isolated to a specific file or find result; once it began occurring, the misbehavior continued with each file/location in my find results list. Version: 1.84.2 (user setup) |
@hediet this is most consistently happening to me when I'm viewing worktree diff, then staging it in the sidebar. It happens randomly, but I noticed this is what I was usually doing just before it does. I have to Reload Window each time it happens to fix the issue, until it re-occurs sometime later. |
@hediet Time-correlated
Edit to add: One other thing I observe is the only-shows-deleted behavior seems to happen on the second or later Replace (Ctrl+Shift+1) operation in the same file. Clicking a find result in a different file and then clicking back to the offending file seems to "reinitialize" things into a working state that shows the addition and removal as expected. Edit to add again: This seems to be happening in the Replace Preview editor today. I'm not sure how to judge whether what I'm seeing today is related to the original issue or not since it's similar squirrely behavior in diffing. Sorry if this is in fact a distinct issue. |
This actually might be a duplicate of #198516 which I already fixed last week in insiders. |
Closing as duplicate of #198516. |
Nevermind, I think your fix didn't go to release yet
|
This issue is most certainly not resolved. I've had this problem for several months but it was always "fixed" by closing and restarting Code. As of today it's happening about every five files or so. It's definitely a cross-browser issue. I'm using Ubuntu and at least two of the people reporting the bug in this thread are using Windows. Can someone give me a status on this that I can explain easily to my boss? Thanks. Version: 1.85.1 |
@jbnv Please see the issue here. The fix just landed last week, so it will be available in next months release (17e0dec). Also, please share the logs of the dev tools the next time this happens. This helps to verify that the bugfix indeed fixes your issue. |
Type: Bug
VS Code version: Code 1.82.1 (6509174, 2023-09-08T08:45:05.575Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (136)
A/B Experiments
Screenshots
Here is the Split View diff, where you can see that code was removed:
And here is the Inline View, which would normally show the removed text, but no longer does:
The text was updated successfully, but these errors were encountered: