mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
Merge pull request #282 from csams/issue-281
Fix FollowLink when searching tags.
This commit is contained in:
@@ -2086,6 +2086,7 @@ local function FollowLink(opts)
|
||||
|
||||
if opts.follow_tag ~= nil then
|
||||
kind = "tag"
|
||||
title = opts.follow_tag
|
||||
if opts.templateDir ~= nil then
|
||||
globArg = "--glob=!" .. "**/" .. opts.templateDir .. "/*.md"
|
||||
end
|
||||
@@ -2095,10 +2096,12 @@ local function FollowLink(opts)
|
||||
|
||||
if kind == "tag" then
|
||||
search_mode = "tag"
|
||||
if title == nil then
|
||||
local saved_reg = vim.fn.getreg('"0')
|
||||
vim.cmd("normal yiw")
|
||||
title = vim.fn.getreg('"0')
|
||||
vim.fn.setreg('"0', saved_reg)
|
||||
end
|
||||
else
|
||||
local saved_reg = vim.fn.getreg('"0')
|
||||
if kind == "link" then
|
||||
|
||||
Reference in New Issue
Block a user