diff options
| author | Marcus Caisey <marcus@teckna.com> | 2022-09-17 09:14:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-17 10:14:53 +0200 |
| commit | 4a43d13c953596503ff37fbc0cc80e68099c5c5c (patch) | |
| tree | 37ca81222f52a9e27818f743240323f9b435c3e5 /lua/telescope/builtin | |
| parent | 1fd497e8ffc99a70cac0be5a9b41e5014a1430e5 (diff) | |
fix: don't include current line in lsp references if current_line=false (#2165)
Diffstat (limited to 'lua/telescope/builtin')
| -rw-r--r-- | lua/telescope/builtin/__lsp.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index cf3478e..21aa8ed 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -25,7 +25,7 @@ lsp.references = function(opts) local locations = {} if result then local results = vim.lsp.util.locations_to_items(result, vim.lsp.get_client_by_id(ctx.client_id).offset_encoding) - if include_current_line then + if not include_current_line then locations = vim.tbl_filter(function(v) -- Remove current line from result return not (v.filename == filepath and v.lnum == lnum) |
