From 2e421ef02dd1acf596d6c382d27230381a946b47 Mon Sep 17 00:00:00 2001 From: pjmtdw Date: Mon, 16 May 2022 05:00:01 +0900 Subject: fix: get mark list from opts.bufnr instead of using :marks (#1935) Should fix marks when going through builtin.builtin --- lua/telescope/make_entry.lua | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'lua/telescope/make_entry.lua') diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 5c39c4e..703a00a 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -635,20 +635,15 @@ function make_entry.gen_from_apropos(opts) end function make_entry.gen_from_marks(_) - return function(line) - local split_value = utils.max_split(line, "%s+", 4) - - local mark_value = split_value[1] - local cursor_position = vim.fn.getpos("'" .. mark_value) - + return function(item) return { - value = line, - ordinal = line, - display = line, - lnum = cursor_position[2], - col = cursor_position[3], - start = cursor_position[2], - filename = vim.api.nvim_buf_get_name(cursor_position[1]), + value = item.line, + ordinal = item.line, + display = item.line, + lnum = item.lnum, + col = item.col, + start = item.lnum, + filename = item.filename, } end end -- cgit v1.2.3