From 6735f400fbdc220f8d25a33208206650eeebb24c Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Thu, 4 Jun 2020 14:32:42 +0200 Subject: [PATCH] Fix EditorHeuristics tests --- lib/editors/heuristics.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/editors/heuristics.dart b/lib/editors/heuristics.dart index 4307b8b6..8f28fe25 100644 --- a/lib/editors/heuristics.dart +++ b/lib/editors/heuristics.dart @@ -31,9 +31,6 @@ EditorHeuristicResult autoAddBulletList( } var prevLineStart = curText.lastIndexOf('\n', cursorPos - 2); - if (prevLineStart < 0 || (cursorPos - 1) < 0) { - return null; - } prevLineStart = prevLineStart == -1 ? 0 : prevLineStart + 1; var prevLine = curText.substring(prevLineStart, cursorPos - 1);