This commit is contained in:
TJ DeVries
2020-09-28 17:03:59 -04:00
parent 079773ebee
commit 3592b1f8b0
5 changed files with 92 additions and 46 deletions

View File

@@ -361,8 +361,15 @@ function Picker:find()
return
end
if first_line > 0 or last_line > 1 then
return
end
local prompt = vim.api.nvim_buf_get_lines(prompt_bufnr, first_line, last_line, false)[1]
-- TODO: Statusbar possibilities here.
-- vim.api.nvim_buf_set_virtual_text(prompt_bufnr, 0, 1, { {"hello", "Error"} }, {})
local filtered_amount = 0
local displayed_amount = 0
local displayed_fn_amount = 0
@@ -643,6 +650,10 @@ function Picker:set_selection(row)
-- Probably something with setting a row that's too high for this?
-- Not sure.
local set_ok, set_errmsg = pcall(function()
if not a.nvim_buf_is_valid(results_bufnr) then
return
end
local prompt = vim.api.nvim_buf_get_lines(self.prompt_bufnr, 0, 1, false)[1]
-- Handle adding '> ' to beginning of selections