summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers.lua
diff options
context:
space:
mode:
authoroberblastmeister <61095988+oberblastmeister@users.noreply.github.com>2021-01-05 02:50:44 -0500
committerGitHub <noreply@github.com>2021-01-05 08:50:44 +0100
commitf750159203077b00cecdd9f68c254aa70d10f879 (patch)
treef0f75896f15cb4d8fb31ac5f30beeccf2e5414e3 /lua/telescope/pickers.lua
parent9503603f888305ec799c9346f51a6e3da7f5b89b (diff)
feat: add actions.get_current_line (#391)
Diffstat (limited to 'lua/telescope/pickers.lua')
-rw-r--r--lua/telescope/pickers.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index 96af5b6..67553c2 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -524,6 +524,9 @@ function Picker:find()
error('Unknown selection strategy: ' .. selection_strategy)
end
+ local current_line = vim.api.nvim_get_current_line():sub(self.prompt_prefix:len() + 1)
+ state.set_global_key('current_line', current_line)
+
self:clear_extra_rows(results_bufnr)
self:highlight_displayed_rows(results_bufnr, prompt)