Skip to content

Commit f3a8f5e

Browse files
committed
fix: update separately
1 parent 95fbe9f commit f3a8f5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/search-and-replace/state.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function state:create_buffer(scope, cb)
3333
self.cleanup(self, scope)
3434
local word = vim.fn.expand("<cword>")
3535
cb(word)
36-
vim.cmd("cfdo %s/\\<" .. word .. "\\>/" .. text .. "/g | update")
36+
vim.cmd("cfdo %s/\\<" .. word .. "\\>/" .. text .. "/g")
37+
vim.cmd("cfdo update")
3738

3839
log.debug(scope, "replace done")
3940
end)

0 commit comments

Comments
 (0)