Fixed last line search

Signed-off-by: Rémi BERTHO <remi.bertho@dalan.fr>
This commit is contained in:
Rémi BERTHO 2017-10-24 18:41:32 +02:00
parent 3dc083242f
commit 8bf32f65a5
Signed by: dalan
GPG key ID: EE3B917931C07B64

View file

@ -236,6 +236,7 @@ def find_line(begin_pos, end_pos, new_lines):
return num_line, begin_pos - old_pos_line + 1, end_pos - old_pos_line return num_line, begin_pos - old_pos_line + 1, end_pos - old_pos_line
num_line += 1 num_line += 1
old_pos_line = pos_line old_pos_line = pos_line
return num_line, begin_pos - old_pos_line + 1, end_pos - old_pos_line
if __name__ == '__main__': if __name__ == '__main__':