summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2021-09-26 12:56:06 +0200
committerGitHub <noreply@github.com>2021-09-26 12:56:06 +0200
commit41f362006bbe1412ecbe7253d022cceece4e9472 (patch)
tree55d2455a4be5f9fd92e5e06fda88ec64e9a72c52
parentf6480b0ecb5ec99d2f966939d565921ae484fbab (diff)
fix: tags now also support suppercollider tags (#1284)
-rw-r--r--lua/telescope/make_entry.lua2
-rw-r--r--lua/telescope/previewers/buffer_previewer.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index 917b6f8..eaab12e 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -903,7 +903,7 @@ function make_entry.gen_from_ctags(opts)
local tag, file, scode, lnum
-- ctags gives us: 'tags\tfile\tsource'
- tag, file, scode = string.match(line, '([^\t]+)\t([^\t]+)\t/^\t?(.*)/;"\t+.*')
+ tag, file, scode = string.match(line, '([^\t]+)\t([^\t]+)\t/^?\t?(.*)/;"\t+.*')
if not tag then
-- hasktags gives us: 'tags\tfile\tlnum'
tag, file, lnum = string.match(line, "([^\t]+)\t([^\t]+)\t(%d+).*")
diff --git a/lua/telescope/previewers/buffer_previewer.lua b/lua/telescope/previewers/buffer_previewer.lua
index 030f18a..c04c0dc 100644
--- a/lua/telescope/previewers/buffer_previewer.lua
+++ b/lua/telescope/previewers/buffer_previewer.lua
@@ -570,7 +570,7 @@ previewers.ctags = defaulter(function(_)
bufname = self.state.bufname,
winid = self.state.winid,
callback = function(bufnr)
- vim.api.nvim_buf_call(bufnr, function()
+ pcall(vim.api.nvim_buf_call, bufnr, function()
determine_jump(entry)(self, bufnr)
end)
end,