diff options
Diffstat (limited to 'lua/telescope/pickers.lua')
| -rw-r--r-- | lua/telescope/pickers.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index a60d2df..449d869 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -473,7 +473,7 @@ function Picker:find() pcall(a.nvim_buf_set_option, prompt_bufnr, 'filetype', 'TelescopePrompt') if self.default_text then - vim.api.nvim_buf_set_lines(prompt_bufnr, 0, 1, false, {self.default_text}) + self:set_prompt(self.default_text) end if self.initial_mode == "insert" then @@ -544,6 +544,11 @@ function Picker:delete_selection(delete_cb) end) end +function Picker:set_prompt(str) + -- TODO(conni2461): As soon as prompt_buffers are fix use this: + -- vim.api.nvim_buf_set_lines(self.prompt_bufnr, 0, 1, false, { str }) + vim.api.nvim_feedkeys(str, 'n', false) +end function Picker.close_windows(status) local prompt_win = status.prompt_win |
