Skip to content

Commit

Permalink
perf(incpreview): only perf replacements when there search matches
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Jun 6, 2024
1 parent 3a89922 commit 327904e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rip-substitute/rg-operations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function M.incrementalPreview()
end)

-- INSERT REPLACEMENTS AS VIRTUAL TEXT
if toReplace == "" then return end
if toReplace == "" or #searchMatchEndCols == 0 then return end

vim.list_extend(rgArgs, { "--replace=" .. toReplace })
rgResultsInViewportIter(rgArgs):each(function(result)
Expand Down

0 comments on commit 327904e

Please sign in to comment.