Skip to content

Commit 9d2090b

Browse files
authored
"Show Next Change" doesn't show the right change (microsoft#180951)
Fixes microsoft#180744
1 parent 0198f59 commit 9d2090b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ export class DirtyDiffController extends Disposable implements DirtyDiffContribu
786786
}
787787

788788
let index: number;
789-
if (this.editor.hasModel() && (typeof lineNumber === 'number')) {
789+
if (this.editor.hasModel() && (typeof lineNumber === 'number' || !this.widget.provider)) {
790790
index = this.model.findNextClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber, true, this.widget.provider);
791791
} else {
792792
const providerChanges: number[] = this.model.mapChanges.get(this.widget.provider) ?? this.model.mapChanges.values().next().value;
@@ -1466,7 +1466,7 @@ export class DirtyDiffModel extends Disposable {
14661466
const possibleChangesLength = possibleChanges.length;
14671467

14681468
if (inclusive) {
1469-
if ((getModifiedEndLineNumber(change.change) >= lineNumber) && (change.change.modifiedStartLineNumber <= lineNumber)) {
1469+
if (getModifiedEndLineNumber(change.change) >= lineNumber) {
14701470
if (preferredProvider && change.label !== preferredProvider) {
14711471
possibleChanges.push(i);
14721472
} else {

0 commit comments

Comments
 (0)