fix a bug where the line numbers were incorrect if the file had any line folding in it