match prev_char ch with | None -> () | Some c when c = '\n' -> () | Some c -> rewind ch 1; rewind_to_beginning_of_line ch