From 1569202d39c40d7a44de5eb1b10cf203dd33af41 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:18:17 +0200 Subject: fix(impatient): avoid get_options in fast handler (#2451) --- lua/lvim/impatient.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua/lvim/impatient.lua') diff --git a/lua/lvim/impatient.lua b/lua/lvim/impatient.lua index 4fdc0026..230e5195 100644 --- a/lua/lvim/impatient.lua +++ b/lua/lvim/impatient.lua @@ -203,6 +203,10 @@ function M.update_reduced_rtp() end local function load_package_with_cache_reduced_rtp(name) + if vim.in_fast_event() then + -- Can't set/get options in the fast handler + return load_package_with_cache(name, "fast") + end local orig_rtp = get_option "runtimepath" local orig_ei = get_option "eventignore" -- cgit v1.2.3