Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.80.1 OS Version: macOS 13.4.1 Steps to Reproduce: two empty file the diff view shows "removed" and "" lines This issue is the same as but happens again
Can you share a screenshot?
An empty file compare to itself <img width="1033" alt="image" src=""
I see, thanks!
To verify: Select latest dev version and notice there is no red/green in this .
The issue is verified. I am wondering if we want to see the commands starting with when there is no active file? I see this command while I have no active text editor.

Discussion:
// This significantly speeds up the case when the original file is empty if (original.getLineCount() === 1 && original.getLineMaxColumn(1) === 1) { <ins> if (modified.getLineCount() === 1 && modified.getLineMaxColumn(1) === 1) { return { changes: [], identical: true, quitEarly: false, moves: [], }; } </ins> return { changes: [ new LineRangeMapping(

*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { compareBy, findLastIndex, numberComparator, reverseOrder } from 'vs/base/common/arrays'; </del> <ins> import { compareBy, equals, findLastIndex, numberComparator, reverseOrder } from 'vs/base/common/arrays'; </ins> import { assertFn, checkAdjacentItems } from 'vs/base/common/assert'; import { CharCode } from 'vs/base/common/charCode'; import { SetMap } from 'vs/base/common/collections';

private readonly myersDiffingAlgorithm = new MyersDiffAlgorithm(); computeDiff(originalLines: string[], modifiedLines: string[], options: ILinesDiffComputerOptions): LinesDiff { <ins> if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) { return new LinesDiff([], [], false); } </ins> if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) { <del> return { changes: [ new LineRangeMapping( new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [ new RangeMapping( new Range(1, 1, originalLines.length, originalLines[0].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[0].length + 1) ) ] ) ], hitTimeout: false, moves: [], }; </del> <ins> return new LinesDiff([ new LineRangeMapping( new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [ new RangeMapping( new Range(1, 1, originalLines.length, originalLines[0].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[0].length + 1) ) ] ) ], [], false); </ins> } const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);