summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-09-28 17:03:59 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-09-28 17:03:59 -0400
commit3592b1f8b0ca207462bf945af52026e592afda30 (patch)
tree9e522af7e92425e5050a47a8367043a0af844b56 /lua/telescope/pickers.lua
parent079773ebee5f18f55c72856049c1a332dabe28e2 (diff)
fix: 126
Diffstat (limited to 'lua/telescope/pickers.lua')
-rw-r--r--lua/telescope/pickers.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index b6fba4d..db6ef5d 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -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