File tree 2 files changed +3
-3
lines changed
lua/nvim-treesitter-refactor
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function M.list_definitions(bufnr)
71
71
for _ , node in ipairs (definitions ) do
72
72
local lnum , col , _ = node .node :start ()
73
73
local type = string.upper (node .type :sub (1 , 1 ))
74
- local text = ts_query .get_node_text (node .node ) or " "
74
+ local text = ts_query .get_node_text (node .node , bufnr ) or " "
75
75
table.insert (qf_list , {
76
76
bufnr = bufnr ,
77
77
lnum = lnum + 1 ,
@@ -126,7 +126,7 @@ function M.list_definitions_toc()
126
126
127
127
local lnum , col , _ = def .node :start ()
128
128
local type = string.upper (def .type :sub (1 , 1 ))
129
- local text = ts_query .get_node_text (def .node ) or " "
129
+ local text = ts_query .get_node_text (def .node , bufnr ) or " "
130
130
table.insert (loc_list , {
131
131
bufnr = bufnr ,
132
132
lnum = lnum + 1 ,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ function M.smart_rename(bufnr)
43
43
return
44
44
end
45
45
46
- local node_text = ts_query .get_node_text (node_at_point )
46
+ local node_text = ts_query .get_node_text (node_at_point , bufnr )
47
47
local input = { prompt = " New name: " , default = node_text or " " }
48
48
if not vim .ui .input then
49
49
local new_name = vim .fn .input (input .prompt , input .default )
You can’t perform that action at this time.
0 commit comments