From 60187788a1d24e68f239be61ddf76e9b594217fc Mon Sep 17 00:00:00 2001 From: Luke McMahon Date: Mon, 2 Dec 2024 10:19:14 +1100 Subject: [PATCH] fix: properly implement toggle --- lua/smear_cursor/init.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/smear_cursor/init.lua b/lua/smear_cursor/init.lua index 4c41fdf..069407a 100644 --- a/lua/smear_cursor/init.lua +++ b/lua/smear_cursor/init.lua @@ -61,13 +61,7 @@ M.setup = function(opts) end M.toggle = function(opts) - opts = opts or {} - - if opts.enabled then - opts.enabled = false - else - opts.enabled = true - end + M.enabled = not M.enabled end setmetatable(M, metatable)