( editorNotebook: NotebookDocument, document: TextDocument )
| 19 | * @returns The index of the cell in the notebook |
| 20 | */ |
| 21 | export function getCellIndex( |
| 22 | editorNotebook: NotebookDocument, |
| 23 | document: TextDocument |
| 24 | ) { |
| 25 | return editorNotebook |
| 26 | .getCells() |
| 27 | .findIndex( |
| 28 | (cell) => cell.document.uri.toString() === document.uri.toString() |
| 29 | ); |
| 30 | } |