Skip to content

Commit 3aee42e

Browse files
saidelikeCedric Halbronn
andauthored
remove unncessary function performEditsAndUpdateInternal() (#2277)
## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet All tests passing. ` 7211 passing (4m)` Co-authored-by: Cedric Halbronn <[email protected]>
1 parent b9709f9 commit 3aee42e

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

packages/cursorless-engine/src/core/updateSelections/updateSelections.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export async function performEditsAndUpdateSelections(
258258
document,
259259
originalSelections,
260260
);
261-
return performEditsAndUpdateInternal(
261+
return performEditsAndUpdateFullSelectionInfos(
262262
rangeUpdater,
263263
editor,
264264
edits,
@@ -307,27 +307,12 @@ export async function performEditsAndUpdateRanges(
307307
): Promise<Range[][]> {
308308
const document = editor.document;
309309
const selectionInfoMatrix = rangesToSelectionInfos(document, originalRanges);
310-
return performEditsAndUpdateInternal(
311-
rangeUpdater,
312-
editor,
313-
edits,
314-
selectionInfoMatrix,
315-
);
316-
}
317-
318-
async function performEditsAndUpdateInternal(
319-
rangeUpdater: RangeUpdater,
320-
editor: EditableTextEditor,
321-
edits: Edit[],
322-
selectionInfoMatrix: FullSelectionInfo[][],
323-
) {
324-
await performEditsAndUpdateFullSelectionInfos(
310+
return performEditsAndUpdateFullSelectionInfos(
325311
rangeUpdater,
326312
editor,
327313
edits,
328314
selectionInfoMatrix,
329315
);
330-
return selectionInfosToSelections(selectionInfoMatrix);
331316
}
332317

333318
// FIXME: Remove this function if we don't end up using it for the next couple use cases, eg `that` mark and cursor history

0 commit comments

Comments
 (0)