From 0942eb587840499b23ae2e0b1dfb439b4ef5730f Mon Sep 17 00:00:00 2001 From: Kurenshe Nurdaulet <63652620+EpsilonKu@users.noreply.github.com> Date: Sat, 19 Aug 2023 18:51:30 +0600 Subject: [PATCH] Check regex for null --- lua/spectre/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/spectre/init.lua b/lua/spectre/init.lua index 7c4d720..1a62f3e 100644 --- a/lua/spectre/init.lua +++ b/lua/spectre/init.lua @@ -672,6 +672,7 @@ M.change_options = function(key) state.options[key] = false end state.options[key] = not state.options[key] + if state.regex == nil then return ;end state.regex.change_options(state_utils.get_replace_engine_config().options_value) if state.query.search_query ~= nil then ui.render_search_ui()