MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / getCellIndex

Function getCellIndex

src/util/notebook.ts:21–30  ·  view source on GitHub ↗
(
  editorNotebook: NotebookDocument,
  document: TextDocument
)

Source from the content-addressed store, hash-verified

19 * @returns The index of the cell in the notebook
20 */
21export 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}

Callers 1

focusEditorFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected