Changeset: Remove unnecessary `linesApplySplice()`

pull/5268/head
Richard Hansen 2021-03-21 14:58:05 -04:00
parent 37bb297e76
commit 7ec0d5f385
1 changed files with 1 additions and 10 deletions

View File

@ -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;