mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Pad out This lines.
This commit is contained in:
parent
77576905d1
commit
aa87f65466
@ -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 -> showDiff before (fst sources)
|
||||
This before -> let beforeString = showDiff before (fst sources) in beforeString ++ showString (replicate (max 0 (min n (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 . Source.slice (getRange diff)
|
||||
|
Loading…
Reference in New Issue
Block a user