Fix discrepancy in max line length
The line length calculated in `Doc:load` didn't account for the newline that gets added.
This commit is contained in:
@@ -72,7 +72,7 @@ function Doc:load(filename)
|
|||||||
self.crlf = true
|
self.crlf = true
|
||||||
end
|
end
|
||||||
table.insert(self.lines, line .. "\n")
|
table.insert(self.lines, line .. "\n")
|
||||||
local line_len = string.len(line)
|
local line_len = string.len(line) + 1 -- account for newline
|
||||||
if line_len > max_length then
|
if line_len > max_length then
|
||||||
max_length = line_len
|
max_length = line_len
|
||||||
line_numbers = { [i] = true } -- new longest line
|
line_numbers = { [i] = true } -- new longest line
|
||||||
|
|||||||
Reference in New Issue
Block a user