fix: (WIP) allow following line-split links on the first line (#309)

Currently only works when the cursor is on the first line. 
This PR must be followed by a second one that would make it work when the cursor is on the second line. However, this requires significantly more work.
This commit is contained in:
Erik Fasterius
2024-02-27 14:10:16 +01:00
committed by GitHub
parent f98279707d
commit a684d6ebe7

View File

@@ -2122,6 +2122,7 @@ local function FollowLink(opts)
vim.cmd("normal yi]")
title = vim.fn.getreg('"0')
title = title:gsub("^(%[)(.+)(%])$", "%2")
title = title:gsub("%s*\n", " ")
title = linkutils.remove_alias(title)
else
-- we are in an external [link]