open Notty let current_line size_x y scroll (el : Grep.display_type) i = match el with | Bold el -> if i == y - scroll then ( let fill = String.make (max (size_x - String.length el) 0) ' ' in I.strf "%s%s" ~attr:A.(st bold ++ st reverse) el fill |> I.pad ~l:0 ~t:i) else I.strf "%s" ~attr:A.(st bold) el |> I.pad ~l:0 ~t:i | Normal el -> if i == y - scroll then ( let fill = String.make (max (size_x - String.length el) 0) ' ' in I.strf "%s%s" ~attr:A.(st reverse) el fill |> I.pad ~l:0 ~t:i) else I.strf "%s" el |> I.pad ~l:0 ~t:i