mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 15:03:16 +00:00
cleanup
This commit is contained in:
1 parent
67bac7c7f9
commit
f859696b05
1 file changed
+4
-4
@@ -130,10 +130,10 @@ findDiffs (LeftSide left) (RightSide right) = addInserts markDeletesAndUnchanged
|
||||
markDeletesAndUnchangedChars :: Seq DiffedChar
|
||||
markDeletesAndUnchangedChars = S.mapWithIndex f left
|
||||
where
|
||||
f :: Int -> FormattedChar -> DiffedChar
|
||||
f i x = DiffedChar x $
|
||||
if i `elem` deleteIndicies then Deleted
|
||||
else UnchangedChar $ unchangedChars M.! i -- should never error
|
||||
f :: Int -> FormattedChar -> DiffedChar
|
||||
f i x = DiffedChar x $
|
||||
if i `elem` deleteIndicies then Deleted
|
||||
else UnchangedChar $ unchangedChars M.! i -- should never error
|
||||
|
||||
addInserts :: Seq DiffedChar -> Seq DiffedChar
|
||||
addInserts base = F.foldr f base edits -- start from end and work backwards, hence foldr
|
||||
|
||||
Reference in new issue
Block a user