diff options
| author | James Trew <66286082+jamestrew@users.noreply.github.com> | 2022-02-14 11:39:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-14 17:39:58 +0100 |
| commit | 206e71d133fee0909a18253ad0c45625e83f0026 (patch) | |
| tree | 17d94241733f11d23e2cb89b2595c10e2d46638f /lua/telescope/make_entry.lua | |
| parent | c948263d896d1515ac062439205bcb3b2bd3e1cd (diff) | |
fix: add opts.bufnr and opts.winnr to builtin picker (#1706)
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index e3d7638..38a5d9b 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -536,7 +536,7 @@ function make_entry.gen_from_treesitter(opts) return function(entry) local ts_utils = require "nvim-treesitter.ts_utils" local start_row, start_col, end_row, _ = ts_utils.get_node_range(entry.node) - local node_text = ts_utils.get_node_text(entry.node)[1] + local node_text = ts_utils.get_node_text(entry.node, bufnr)[1] return { valid = true, @@ -906,7 +906,7 @@ function make_entry.gen_from_ctags(opts) opts = opts or {} local cwd = vim.fn.expand(opts.cwd or vim.loop.cwd()) - local current_file = Path:new(vim.fn.expand "%"):normalize(cwd) + local current_file = Path:new(vim.api.nvim_buf_get_name(opts.bufnr)):normalize(cwd) local display_items = { { remaining = true }, |
