fix: remove the completion buffer from the buffer list
You will no longer see the completion "Buffers" in the list of buffers when searching for buffers. Fixes-issue: #7
This commit is contained in:
parent
a712c929cb
commit
f70cd6aad8
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ vim.api.nvim_create_user_command("IvyBuffers", function()
|
|||
-- substring +2 to remove the `/` from the start of the path to give us a
|
||||
-- true relative path
|
||||
local buffer_name = vim.api.nvim_buf_get_name(buffer):sub(#vim.fn.getcwd() + 2, -1)
|
||||
if vim.api.nvim_buf_is_loaded(buffer) and #buffer_name > 0 then
|
||||
local file_type = vim.api.nvim_buf_get_option(buffer, "filetype")
|
||||
if vim.api.nvim_buf_is_loaded(buffer) and file_type ~= "ivy" and #buffer_name > 0 then
|
||||
local score = libivy.ivy_match(input, buffer_name)
|
||||
if score > -200 or #input == 0 then
|
||||
table.insert(list, { score = score, content = buffer_name })
|
||||
|
|
|
|||
Loading…
Reference in a new issue