添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
玩命的海豚  ·  GitHub - ...·  2 周前    · 
活泼的面包  ·  Docker安装drools ...·  2 周前    · 
急躁的烈酒  ·  RStudio & Posit ...·  3 周前    · 
潇洒的茶壶  ·  mysql workbench ...·  1 月前    · 
个性的火柴  ·  mysql workbench ...·  1 月前    · 
谦和的小熊猫  ·  I am started getting ...·  2 月前    · 
老实的香菇  ·  畅通民生“幸福路” ...·  3 月前    · 

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
  • Open a file that is stored in source control.
  • Remove some text from it.
  • In the "Source Control" menu, select the file to open the diff and see the changes.
  • Toggle between Split View and Inline View. Split View shows the deleted text, while Inline View does not. The minimap scrollbar shows red though, indicating it sees the removed code.
  • 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 Value 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
    video_decode: enabled
    video_encode: enabled
    vulkan: disabled_off
    webgl: enabled
    webgl2: enabled
    webgpu: enabled Load (avg) undefined Memory (System) 31.72GB (15.89GB free) Process Argv --crash-reporter-id e8c746cd-ffb1-4751-aa20-daae247bf885 Screen Reader
    Extensions (136) Extension Author (truncated) Version

    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)
    Commit: f1b07bd
    Date: 2023-10-10T23:48:05.904Z
    Electron: 25.8.4
    ElectronBuildId: 24154031
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.19044

    It looks like something with the view zones is off. The alignment viewzones are missing in the first screenshot.

    Do you have repro steps?

    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.

    Happens for me invariably. Here is my version info and settings.json

    Version: 1.83.1 (Universal)
    Commit: f1b07bd
    Date: 2023-10-10T23:46:55.789Z (1 wk ago)
    Electron: 25.8.4
    ElectronBuildId: 24154031
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Darwin arm64 22.6.0

    "window.autoDetectColorScheme": true, "workbench.sideBar.location": "right", "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" "editor.tabSize": 2, "[html]": { "editor.defaultFormatter": "vscode.html-language-features" "editor.lineNumbers": "relative", "editor.fontFamily": "SF Mono,Menlo,monospace", "editor.fontLigatures": true, "workbench.preferredLightColorTheme": "Default Light+ Experimental", "workbench.preferredDarkColorTheme": "Default Dark+ Experimental", "git.confirmSync": false, "[python]": { "editor.formatOnType": true "thunder-client.previewFeatures": true, "thunder-client.responseLimit": 5, "ruby.rubocop.onSave": false, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" "terminal.integrated.fontSize": 17, "ruby.useBundler": true, //run non-lint commands with bundle exec "ruby.useLanguageServer": true, // use the internal language server (see below) "ruby.lint": { "rubocop": { "useBundler": true // enable rubocop via bundler "ruby.format": "rubocop", "workbench.colorTheme": "Alabaster", "editor.formatOnSaveMode": "modificationsIfAvailable", "editor.formatOnSave": true, "editor.fontSize": 17

    Can you check/share the dev tool logs when this happens?
    Can you also share both sides of the diff where 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 Stage selected changes which was resulting is some very strange behavior. Developer: Reload Window solved all my problems. Thanks!

    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 1.84.2 (user setup) . After restart, the issue is not present, but that could be temporary until the issue returns again (as per previous comments here). I'm not able to forcefully reproduce the issue by doing things like switching diff views, staging, unstaging, staging selected ranges etc.

    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 git diff on Terminal and everything is alright there, so I'm thinking this might be a corruption of the VS Code's internal diff cache or something, which could explain why Reload Window or restart of VS Code fixes this temporarily.

    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). Developer: Reload Window was an effective workaround for me as well. Before this occurred, I had been doing an abundant amount of mass find/replace (non-regex, non-case-sensitive, non-whole-word, non-preserve-case), that had cumulatively dirtied >800 files in my working directory. In the course of doing this, I had invoked the diff editor many dozens (if not hundreds) of times from within the session before this misbehavior occurred.

    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)
    Commit: 1a5daa3
    Date: 2023-11-09T10:51:52.184Z
    Electron: 25.9.2
    ElectronBuildId: 24603566
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.22621

    @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 renderer.log entries when something that looked like this issue re-occurred (except showing only the removal, not the addition) just a bit ago... hope this provides a hint at what might be going on.

    2023-11-22 13:38:00.272 [error] Cannot read properties of undefined (reading 'endLineNumberExclusive'): TypeError: Cannot read properties of undefined (reading 'endLineNumberExclusive')
        at E.intersectsStrict (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:96:10545)
        at D (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:45393)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47301
        at w (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:8256)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47296
    2023-11-22 13:38:45.797 [error] Cannot read properties of undefined (reading 'endLineNumberExclusive'): TypeError: Cannot read properties of undefined (reading 'endLineNumberExclusive')
        at E.intersectsStrict (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:96:10545)
        at D (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:45393)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47301
        at w (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:8256)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47296
    2023-11-22 13:38:56.498 [error] Cannot read properties of undefined (reading 'endLineNumberExclusive'): TypeError: Cannot read properties of undefined (reading 'endLineNumberExclusive')
        at E.intersectsStrict (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:96:10545)
        at D (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:45393)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47301
        at w (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:8256)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47296
    2023-11-22 13:40:04.384 [error] Cannot read properties of undefined (reading 'endLineNumberExclusive'): TypeError: Cannot read properties of undefined (reading 'endLineNumberExclusive')
        at E.intersectsStrict (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:96:10545)
        at D (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:45393)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47301
        at w (vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:85:8256)
        at vscode-file://vscode-app/c:/Users/me/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:681:47296
    

    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.
    Thanks so much @JoshHarmon for the log! That was super helpful to track this down.

    Are you sure this is fixed? If you look in the first post of the issue, the split screen screenshot is not correct either -it's missing deleted lines decorations. I just had the same behaviour as that screenshot.

    Missing deleted line decorations in split view:
    And inline view doesn't show anything:

    This happened after "Staging Selected Ranges".
    Reloading the window fixes it temporarily:

    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. Developer: Reload Window is an effective workaround only when the problem happens infrequently; but when I'm trying to review hundreds of files to push a bug fix into production, it's not an effective workaround. The issue that this issue "duplicates" doesn't mean anything to me.

    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
    Commit: 0ee08df
    Date: 2023-12-13T09:47:11.635Z
    Electron: 25.9.7
    ElectronBuildId: 25551756
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Linux x64 5.4.0-169-generic snap

    @jbnv Please see the issue here.

    The fix just landed last week, so it will be available in next months release (17e0dec).
    Feel free to use VS Code insiders, which already contains the fix,

    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.