diff --git a/src/Vervis/Widget/Repo.hs b/src/Vervis/Widget/Repo.hs index 20773f6..1b5b51b 100644 --- a/src/Vervis/Widget/Repo.hs +++ b/src/Vervis/Widget/Repo.hs @@ -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