From a9c89bcbf69a3d0ef47f324a47ff6eb482467e70 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 3 Jun 2024 11:55:20 +0200 Subject: [PATCH] fix(gx): allow `@` in url This will make `gx` work for links for the form https://hachyderm.io/@neovim. --- runtime/lua/vim/ui.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index 99b9b78e2a..f168da4955 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -179,7 +179,13 @@ function M._get_url() current_node = current_node:parent() end end - return vim.fn.expand('') + + local old_isfname = vim.o.isfname + vim.cmd [[set isfname+=@-@]] + local url = vim.fn.expand('') + vim.o.isfname = old_isfname + + return url end return M