Remove line from longest lines table only if needed

Checking if a line needs to be removed is faster than just trying to 
remove it.
This commit is contained in:
Guldoman 2021-08-25 22:27:00 +02:00 committed by Francesco
parent c16145d562
commit 3e6afeccc0
1 changed files with 1 additions and 1 deletions

View File

@ -587,7 +587,7 @@ function Doc:update_max_line_len_range(start_line, end_line)
elseif line_len == max_length then
line_numbers[line] = true
else
line_numbers[line] = nil
if line_numbers[line] then line_numbers[line] = nil end
end
end