Fix #15: silly bug caused following non-special links to crash

This commit is contained in:
Rene Schallner
2021-12-01 14:24:45 +01:00
parent a626225399
commit 4914c9d639
2 changed files with 4 additions and 2 deletions

View File

@@ -473,7 +473,7 @@ local function FollowLink(opts)
local search_mode = "files"
local parts = vim.split(title, "#")
local filename
local filename = ''
-- if there is a #
if #parts ~= 1 then
@@ -560,6 +560,7 @@ local function FollowLink(opts)
cwd = cwd,
prompt_title = "Notes referencing `" .. title .. "`",
default_text = search_pattern,
-- link to specific file (a daily file): [[2021-02-22]]
-- link to heading in specific file (a daily file): [[2021-02-22#Touchpoint]]
-- link to heading globally [[#Touchpoint]]
-- link to heading in specific file (a daily file): [[The cool note#^xAcSh-xxr]]