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:
parent
c16145d562
commit
3e6afeccc0
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue