From 827bff3cb4faaf4e1aacaac0db1ea453e578ca66 Mon Sep 17 00:00:00 2001 From: pdavidow Date: Wed, 16 Aug 2023 23:40:24 -0400 Subject: [PATCH] cleanup --- src/Simplex/Chat/MarkdownEditing.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat/MarkdownEditing.hs b/src/Simplex/Chat/MarkdownEditing.hs index eb31c3ebd9..3f198a6224 100644 --- a/src/Simplex/Chat/MarkdownEditing.hs +++ b/src/Simplex/Chat/MarkdownEditing.hs @@ -114,11 +114,11 @@ findDiffs (LeftSide left) (RightSide right) = addInserts markDeletesAndUnchanged leftWithoutDeletes :: Seq (Int, FormattedChar) -- indexed in original left leftWithoutDeletes = S.filter (\(i, _) -> i `notElem` deleteIndicies) leftZ - where leftZ = S.zip (S.fromList [0 .. S.length left]) left + where leftZ = S.zip (S.fromList [0 .. S.length left - 1]) left rightWithoutInserts :: Seq (Int, FormattedChar) -- indexed in original right rightWithoutInserts = S.filter (\(i, _) -> i `notElem` insertIndicies) rightZ - where rightZ = S.zip (S.fromList [0 .. S.length right]) right + where rightZ = S.zip (S.fromList [0 .. S.length right - 1]) right f :: M.Map Int DiffFormatStatus -> (Int, FormattedChar, FormattedChar) -> M.Map Int DiffFormatStatus f acc (i, FormattedChar _ fL, FormattedChar _ fR) = M.insert i x acc