From 586a6dd039b63047deff789f1618a76639a8bb6f Mon Sep 17 00:00:00 2001 From: dirichy Date: Mon, 20 Oct 2025 17:26:49 +0800 Subject: [PATCH] fix: Allow custom textobject in `motion` of selection --- lua/nvim-surround/buffer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-surround/buffer.lua b/lua/nvim-surround/buffer.lua index d764560..d88f38d 100644 --- a/lua/nvim-surround/buffer.lua +++ b/lua/nvim-surround/buffer.lua @@ -115,7 +115,7 @@ M.set_operator_marks = function(motion) M.del_marks({ "[", "]" }) -- Set the [ and ] marks by calling an operatorfunc vim.go.operatorfunc = "v:lua.require'nvim-surround.utils'.NOOP" - vim.cmd.normal({ args = { "g@" .. motion }, bang = true }) + vim.cmd.normal({ args = { "g@" .. motion } }) -- Adjust the marks to not reside on whitespace M.adjust_mark("[") M.adjust_mark("]")