diff options
| author | Guldoman <giulio.lettieri@gmail.com> | 2021-08-28 18:41:59 +0200 |
|---|---|---|
| committer | Francesco <francesco.bbt@gmail.com> | 2021-08-30 17:58:22 +0200 |
| commit | f106993d0e1fd83329a0689360b8fb3a86a00b99 (patch) | |
| tree | 721db35259ba42e0e6ff0303f1980711dcdf70b3 | |
| parent | 3e6afeccc0ac991f02959de7bc11253172090570 (diff) | |
| download | lite-xl-f106993d0e1fd83329a0689360b8fb3a86a00b99.tar.gz lite-xl-f106993d0e1fd83329a0689360b8fb3a86a00b99.zip | |
Fix discrepancy in max line length
The line length calculated in `Doc:load` didn't account for the newline
that gets added.
| -rw-r--r-- | data/core/doc/init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/core/doc/init.lua b/data/core/doc/init.lua index ce7e0795..88eebda5 100644 --- a/data/core/doc/init.lua +++ b/data/core/doc/init.lua @@ -72,7 +72,7 @@ function Doc:load(filename) self.crlf = true end 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 max_length = line_len line_numbers = { [i] = true } -- new longest line |
