diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 22:53:44 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 22:53:44 -0400 |
| commit | 2ce3ad61aa9342fff4d8be69fc9e019e393bf161 (patch) | |
| tree | 320aa28a0a24f5b0fda870a6f6308826b34ab6d6 /lua | |
| parent | 3cf3acc4d599c502d82848242a0cc0cf70a82845 (diff) | |
fix: #140
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/actions.lua | 11 | ||||
| -rw-r--r-- | lua/telescope/finders.lua | 6 |
2 files changed, 5 insertions, 12 deletions
diff --git a/lua/telescope/actions.lua b/lua/telescope/actions.lua index c1e1d03..4b15c93 100644 --- a/lua/telescope/actions.lua +++ b/lua/telescope/actions.lua @@ -97,13 +97,8 @@ local function goto_file_selection(prompt_bufnr, command) filename = path.normalize(filename, vim.fn.getcwd()) - -- TODO: Sometimes we open something with missing line numbers and stuff... if entry_bufnr then - if command == "edit" then - a.nvim_win_set_buf(original_win_id, entry_bufnr) - else - vim.cmd(string.format(":%s #%d", command, entry_bufnr)) - end + vim.cmd(string.format(":%s #%d", command, entry_bufnr)) else local bufnr = vim.api.nvim_get_current_buf() if filename ~= vim.api.nvim_buf_get_name(bufnr) then @@ -119,10 +114,6 @@ local function goto_file_selection(prompt_bufnr, command) end end end - - if command == "edit" then - vim.api.nvim_command("doautocmd filetypedetect BufRead " .. vim.fn.fnameescape(filename)) - end end end diff --git a/lua/telescope/finders.lua b/lua/telescope/finders.lua index b2c20e8..3943a51 100644 --- a/lua/telescope/finders.lua +++ b/lua/telescope/finders.lua @@ -238,9 +238,11 @@ function StaticFinder:new(opts) local results = {} for k, v in ipairs(input_results) do local entry = entry_maker(v) - entry.index = k - table.insert(results, entry) + if entry then + entry.index = k + table.insert(results, entry) + end end return setmetatable({ results = results }, self) |
