feat: add statusview item to show selections (#1445)
This commit is contained in:
parent
577e99f519
commit
945914b276
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue