提交 7739e89d 编写于 作者: J Joao Moreno

fixes #37229

上级 ebb57e37
......@@ -380,6 +380,10 @@ export class ShowPreviousChangeAction extends EditorAction {
return;
}
if (!controller.canNavigate()) {
return;
}
controller.previous();
}
}
......@@ -410,6 +414,10 @@ export class ShowNextChangeAction extends EditorAction {
return;
}
if (!controller.canNavigate()) {
return;
}
controller.next();
}
}
......@@ -477,6 +485,10 @@ export class DirtyDiffController implements IEditorContribution {
return DirtyDiffController.ID;
}
canNavigate(): boolean {
return this.currentIndex === -1 || this.model.changes.length > 1;
}
next(lineNumber?: number): void {
if (!this.assertWidget()) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册