diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-09 17:33:48 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-15 22:30:08 -0400 |
| commit | 5a7a3147a4553146342aeb5a112c72606367fea5 (patch) | |
| tree | 4e31dcbd41746c011ff681156aa50323ad680cd9 /lua/telescope/make_entry.lua | |
| parent | 18a91f27143628d732ae339b5df3996e3066fdb6 (diff) | |
fix: Use entry maker for marks
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 891d4af..e765904 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -426,4 +426,23 @@ function make_entry.gen_from_apropos(opts) end 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 { + 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]) + } + end +end + return make_entry |
