1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Drop the broken min.

This commit is contained in:
Rob Rix 2016-04-25 13:56:57 -04:00
parent d9c2bb8e4c
commit 1fb647ae9d

View File

@ -116,7 +116,7 @@ instance Eq PrettyDiff where
instance Show PrettyDiff where
show (PrettyDiff sources lines) = intercalate "\n" (showLine 40 <$> lines)
where showLine n line = case runJoin line of
This before -> let beforeString = showDiff before (fst sources) in beforeString ++ showString (replicate (max 0 (min n (n - length beforeString))) ' ') " | "
This before -> let beforeString = showDiff before (fst sources) in beforeString ++ showString (replicate (max 0 (n - length beforeString)) ' ') " | "
That after -> showString (replicate n ' ') (showString " | " (showDiff after (snd sources)))
These before after -> showDiff before (fst sources) ++ showString " | " (showDiff after (snd sources))
showDiff diff = toList . stripNewlines . Source.slice (getRange diff)