We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8040906 commit a273800Copy full SHA for a273800
lua/orgmode/org/mappings.lua
@@ -805,6 +805,7 @@ function OrgMappings:open_at_point()
805
return
806
end
807
808
+ -- handle external links (non-org or without org-specific line target)
809
local url = link.url.str
810
if link.url:is_file_plain() then
811
local file_path = link.url:get_filepath()
@@ -854,7 +855,12 @@ function OrgMappings:open_at_point()
854
855
856
headline = headlines[choice]
857
- vim.cmd(string.format('edit %s', headline.file))
858
+
859
+ if link.url:is_file() then
860
+ vim.cmd(string.format('edit %s', headline.file))
861
+ else
862
+ vim.cmd([[normal! m']]) -- add link source to jumplist
863
+ end
864
vim.fn.cursor({ headline.range.start_line, 0 })
865
vim.cmd([[normal! zv]])
866
0 commit comments