diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-05-02 17:55:26 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-02 22:15:39 +0200 |
| commit | 3cf4097332fc45f42b15acaa2f7b399a7e86e64c (patch) | |
| tree | 0daf9387402a7531d3cc11ad0e581012e4d01cde | |
| parent | 18519a95d62da4c83adf015e622f71bcc7407e06 (diff) | |
| download | vis-lspc-3cf4097332fc45f42b15acaa2f7b399a7e86e64c.tar.gz vis-lspc-3cf4097332fc45f42b15acaa2f7b399a7e86e64c.zip | |
replace // operator with math.floor and regular division
lua52 does not support the // arithemtic operator.
Reported-By: avery havaniceday <shitpostalotl@unix.dog>
| -rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -625,7 +625,7 @@ local function file_lineno_to_viewport_lineno(win, file_lineno) view_lineno = view_lineno + 1 -- Wrapped line this shifts our displayed line down if #win.file.lines[n] > win.viewport.width then - view_lineno = view_lineno + #win.file.lines[n] // win.viewport.width + view_lineno = view_lineno + math.floor(#win.file.lines[n] / win.viewport.width) end end return view_lineno |
