From 0ce77987e32e63e0a66f74eb5c3a134ab9fe19be Mon Sep 17 00:00:00 2001 From: pdavidow Date: Thu, 17 Aug 2023 00:32:44 -0400 Subject: [PATCH] cleanup --- src/Simplex/Chat/MarkdownEditing.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Simplex/Chat/MarkdownEditing.hs b/src/Simplex/Chat/MarkdownEditing.hs index 4388c53502..03ec820fd0 100644 --- a/src/Simplex/Chat/MarkdownEditing.hs +++ b/src/Simplex/Chat/MarkdownEditing.hs @@ -106,17 +106,17 @@ findDiffs (LeftSide left) (RightSide right) = addInserts markDeletesAndUnchanged D.EditDelete m n -> (x', y) where x' = DeleteIndicies $ ds >< S.fromList [m .. n] D.EditInsert _ m n -> (x , y') where y' = InsertIndicies $ is >< S.fromList [m .. n] - unchangedChars :: M.Map Int DiffFormatStatus + unchangedChars :: M.Map Int DiffFormatStatus -- indexed in left unchangedChars = F.foldl' f mempty unchangedCharPairs where unchangedCharPairs :: Seq (Int, FormattedChar, FormattedChar) unchangedCharPairs = g <$> S.zip leftWithoutDeletes rightWithoutInserts - leftWithoutDeletes :: Seq (Int, FormattedChar) -- indexed in original left + leftWithoutDeletes :: Seq (Int, FormattedChar) leftWithoutDeletes = S.filter (\(i, _) -> i `notElem` deleteIndicies) leftZ where leftZ = S.zip (S.fromList [0 .. S.length left - 1]) left - rightWithoutInserts :: Seq (Int, FormattedChar) -- indexed in original right + rightWithoutInserts :: Seq (Int, FormattedChar) rightWithoutInserts = S.filter (\(i, _) -> i `notElem` insertIndicies) rightZ where rightZ = S.zip (S.fromList [0 .. S.length right - 1]) right