From 7f4639a53b3e3aac3ad5deab99b21097264f07cc Mon Sep 17 00:00:00 2001 From: Shawon Date: Sat, 10 Aug 2024 11:20:22 +0600 Subject: [PATCH] fix: Added the ability to open links under cursor Ref: #97 --- lua/markview/keymaps.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/markview/keymaps.lua b/lua/markview/keymaps.lua index 119f014..aa9aed0 100644 --- a/lua/markview/keymaps.lua +++ b/lua/markview/keymaps.lua @@ -23,14 +23,27 @@ keymaps.createKeymap = function (buffer) if err then vim.print("[ Markview.nvim ] : Failed to open: " .. link.address) + break; end if cmd then cmd:wait(); + break; end + ::continue:: end + + local def_cmd, def_err = vim.ui.open(vim.fn.expand("")) + + if def_err then + vim.print("[ Markview.nvim ] : Failed to open: " .. vim.fn.expand("")) + end + + if def_cmd then + def_cmd:wait(); + end end, }) end