Closed babakfp closed 6 months ago
Hi Sorry for not including the code for reproduction. I updated the first comment with the before and after code and a link to reproduction in the Monaco playground.
This is as designed.
But, it doesn't make sense. The diff feature has a single responsibility and it's failing at doing that. It's supposed to make it easier to see the differences, but instead, it's showing incorrect diff.
Here is an example where this heuristic (implemented in extendDiffsToEntireWordIfAppropriate
) makes diffs more readable (top with, bottom without):
In the bottom, it randomly aligns range
with viewportRange
, with the common word ange
.
It also aligns getInlineDecorationsOnLine
with _getDecorationsViewportData
.
Maybe the heuristic can be improved to consider both your and this case. Feel free to provide a PR (which passes CI)!
Type: Bug
What I did was, I changed
Regular
toDuotone
and diff is mostly correct, but in one of the lines, it is not as correct.Code for reproduction
Link to reproduction in the Monaco playground.
BEFORE:
AFTER:
VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:28:19.990Z) OS version: Windows_NT x64 10.0.22621 Modes: Unsupported
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabledcanvas_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)|15.84GB (3.86GB free)| |Process Argv|--crash-reporter-id 14a96bb5-26bc-4084-82b0-8dcbe029f90b| |Screen Reader|no| |VM|0%|
Extensions (17)
Extension|Author (truncated)|Version ---|---|--- vscode-tailwindcss|bra|0.10.5 path-intellisense|chr|2.8.5 postcss|css|1.0.9 vscode-deno|den|3.33.3 gitlens|eam|14.7.0 vsc-material-theme-icons|equ|3.4.0 prettier-vscode|esb|10.1.0 auto-rename-tag|for|0.1.10 text-transformer|Jac|0.0.7 auto-comment-blocks|kev|1.0.1 inline-fold|moa|0.2.6 compare-folders|mos|0.24.2 LiveServer|rit|5.7.9 svelte-vscode|sve|108.2.1 vscode-wakatime|Wak|24.4.0 pretty-ts-errors|Yoa|0.5.3 markdown-all-in-one|yzh|3.6.2A/B Experiments
``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 vscrpc:30673769 2i9eh265:30646982 962ge761:30951796 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 dsvsc019bcf:30953938 3ef8e399:30949928 ```