From 8cb842549c955290d950642ae7c1f66f4bd2bd2d Mon Sep 17 00:00:00 2001 From: jgmdev Date: Mon, 17 Apr 2023 17:26:24 -0400 Subject: [PATCH] StatusView compat fix with older Lua runtimes --- data/core/statusview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/statusview.lua b/data/core/statusview.lua index 35fff21b..930c7aef 100644 --- a/data/core/statusview.lua +++ b/data/core/statusview.lua @@ -247,7 +247,7 @@ function StatusView:register_docview_items() alignment = StatusView.Item.LEFT, get_item = function() local dv = core.active_view - local nsel = #dv.doc.selections // 4 + local nsel = math.floor(#dv.doc.selections / 4) if nsel > 1 then return { style.text, nsel, " selections" } end