From 2e4cc5425c705b1d12beec20c5065ea814176dab Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 10 Jan 2025 08:12:08 +0100 Subject: [PATCH] Remove Math.min that is obsolte with state 6.5.1 --- src/commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.ts b/src/commands.ts index 040229c..27a1a67 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -188,7 +188,7 @@ function blankLine(context: Context[], state: EditorState, line: Line) { let insert = "" for (let i = 0, e = context.length - 2; i <= e; i++) { insert += context[i].blank(i < e - ? countColumn(line.text, 4, Math.min(line.text.length, context[i + 1].from)) - insert.length + ? countColumn(line.text, 4, context[i + 1].from) - insert.length : null, i < e) } return normalizeIndent(insert, state)