From 3cf4097332fc45f42b15acaa2f7b399a7e86e64c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 2 May 2024 17:55:26 +0200 Subject: replace // operator with math.floor and regular division lua52 does not support the // arithemtic operator. Reported-By: avery havaniceday --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 95d280d..4ef447a 100644 --- a/init.lua +++ b/init.lua @@ -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 -- cgit v1.2.3