save string.len() call

default for third parameter of string.sub() is already to use the rest of the string

Co-authored-by: Christopher Head <chead@chead.ca>
This commit is contained in:
Peter Nerlich 2020-12-07 14:19:39 +01:00 committed by GitHub
parent b73fc28f11
commit 6651949665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ local create_lines = function(text)
end
if remaining < string.len(word) then
line = line .. string.sub(word, 1, remaining)
word = string.sub(word, remaining+1, string.len(word))
word = string.sub(word, remaining+1)
if flush_line_and_check_for_return() then return tab end
else
-- used up the word