vscode
vscode copied to clipboard
Added `getAmountOfDiffs` and `getIndexOfCurrentlyRevealedDiff` to the IDiffEditor
Fixes https://github.com/microsoft/monaco-editor/issues/4836.
This PR implements two API's:
getAmountOfDiffs: A helper method to know the current amount of diffs rendered in the IDiffEditorgetIndexOfCurrentlyRevealedDiff: A helper method to get the index of the currently revealed diff
I was wondering if the getIndexOfCurrentlyRevealedDiff could instead be called getCurrentlyRevealedDiff and return an object containing { index: number, diff: DiffMapping }, but i'm not sure if you want DiffMapping to be exposed.
These methods would be really helpful for giving helpful information about the diffs. The goToDiff and revealFirstDiff are great for navigating diffs, but if you want to display some information about the diffs then it's not really possible with the current setup.
@microsoft-github-policy-service agree