StatusView compat fix with older Lua runtimes
This commit is contained in:
parent
e2a582d5fd
commit
ff4364b0ff
|
@ -247,7 +247,7 @@ function StatusView:register_docview_items()
|
||||||
alignment = StatusView.Item.LEFT,
|
alignment = StatusView.Item.LEFT,
|
||||||
get_item = function()
|
get_item = function()
|
||||||
local dv = core.active_view
|
local dv = core.active_view
|
||||||
local nsel = #dv.doc.selections // 4
|
local nsel = math.floor(#dv.doc.selections / 4)
|
||||||
if nsel > 1 then
|
if nsel > 1 then
|
||||||
return { style.text, nsel, " selections" }
|
return { style.text, nsel, " selections" }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue