From 41f362006bbe1412ecbe7253d022cceece4e9472 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Sun, 26 Sep 2021 12:56:06 +0200 Subject: [PATCH] fix: tags now also support suppercollider tags (#1284) --- lua/telescope/make_entry.lua | 2 +- lua/telescope/previewers/buffer_previewer.lua | 2 +- 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,