diff options
| author | August Masquelier <31262046+levouh@users.noreply.github.com> | 2021-04-17 13:50:07 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-17 22:50:07 +0300 |
| commit | f92b9b1fae70d5fac681a29f0df64549c399f18f (patch) | |
| tree | 6dbd6604b636e00e1ecab1fbc326762514510d7f /lua/telescope/make_entry.lua | |
| parent | d27907b0dac658dfa2fb7e63103675d1832f33e0 (diff) | |
fix: live_grep path appending with cwd when already absolute (#768)
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 02d9ca1..8729ebb 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -2,6 +2,8 @@ local entry_display = require('telescope.pickers.entry_display') local path = require('telescope.path') local utils = require('telescope.utils') +local Path = require('plenary.path') + local get_default = utils.get_default local treesitter_type_highlight = { @@ -155,7 +157,11 @@ do local execute_keys = { path = function(t) - return t.cwd .. path.separator .. t.filename, false + if Path:new(t.filename):is_absolute() then + return t.filename, false + else + return t.cwd .. path.separator .. t.filename, false + end end, filename = function(t) |
