fix: add opts.bufnr and opts.winnr to builtin picker (#1706)

This commit is contained in:
James Trew
2022-02-14 11:39:58 -05:00
committed by GitHub
parent c948263d89
commit 206e71d133
8 changed files with 39 additions and 56 deletions

View File

@@ -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 },