mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
refactor: use vim._with
where possible
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`.
This commit is contained in:
@@ -180,10 +180,9 @@ function M._get_url()
|
||||
end
|
||||
end
|
||||
|
||||
local old_isfname = vim.o.isfname
|
||||
vim.cmd [[set isfname+=@-@]]
|
||||
local url = vim.fn.expand('<cfile>')
|
||||
vim.o.isfname = old_isfname
|
||||
local url = vim._with({ go = { isfname = vim.o.isfname .. ',@-@' } }, function()
|
||||
return vim.fn.expand('<cfile>')
|
||||
end)
|
||||
|
||||
return url
|
||||
end
|
||||
|
Reference in New Issue
Block a user