feat: add statusview item to show selections (#1445)

This commit is contained in:
sammyette 2023-04-10 18:16:41 -04:00 committed by George Sokianos
parent 577e99f519
commit 945914b276
1 changed files with 15 additions and 0 deletions

View File

@ -241,6 +241,21 @@ function StatusView:register_docview_items()
tooltip = "line : column"
})
self:add_item({
predicate = predicate_docview,
name = "doc:selections",
alignment = StatusView.Item.LEFT,
get_item = function()
local dv = core.active_view
local nsel = #dv.doc.selections // 4
if nsel > 1 then
return { style.text, nsel, " selections" }
end
return {}
end
})
self:add_item({
predicate = predicate_docview,
name = "doc:indentation",