From 7ec0d5f385b9e27077b311a48d604f91c5aedfbc Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 21 Mar 2021 14:58:05 -0400 Subject: [PATCH] Changeset: Remove unnecessary `linesApplySplice()` --- src/static/js/Changeset.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index bdf25f7de..220a3947b 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -654,15 +654,6 @@ const textLinesMutator = (lines) => { // invariant: if (inSplice && (curLine >= curSplice[0] + curSplice.length - 2)) then // curCol == 0 - /** - * Adds and/or removes entries at a specific offset in `lines`. Called when leaving the splice. - * - * @param {[number, number?, ...string[]?]} s - curSplice - */ - const linesApplySplice = (s) => { - lines.splice(...s); - }; - /** * Get a line from `lines` at given index. * @@ -724,7 +715,7 @@ const textLinesMutator = (lines) => { * close or TODO(doc). */ const leaveSplice = () => { - linesApplySplice(curSplice); + lines.splice(...curSplice); curSplice.length = 2; curSplice[0] = curSplice[1] = 0; inSplice = false;