feat(bultin.buffer): add select_current option (#2918)

This commit is contained in:
Damjan 9000
2024-02-24 15:21:25 +01:00
committed by GitHub
parent 52190bd8f9
commit 6868df51d2
3 changed files with 6 additions and 0 deletions

View File

@@ -949,6 +949,9 @@ internal.buffers = function(opts)
local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1)
table.insert(buffers, idx, element)
else
if opts.select_current and flag == "%" then
default_selection_idx = bufnr
end
table.insert(buffers, element)
end
end