mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-28 22:24:51 +09:00
Minimal diff context line number is 1, not 0, latter caused vector slice error
This commit is contained in:
parent
7d237b7540
commit
0895fbf911
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ addContext ctx orig = prepend . foldr f (undefined, [])
|
|||
)
|
||||
prepend ((_ , _ ), []) = []
|
||||
prepend ((startOld, startNew), l:ls) =
|
||||
let o = max 0 $ startOld - ctx
|
||||
let o = max 1 $ startOld - ctx
|
||||
len = min (startOld - o) ctx
|
||||
in (context orig o (startNew - len) len ++ l) : ls
|
||||
|
||||
|
|
Loading…
Reference in a new issue