Skip to content

Commit

Permalink
fix: match count not displayed when replacement previews active
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Jun 7, 2024
1 parent 8c9eb31 commit c8852f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/rip-substitute/rg-operations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function M.incrementalPreview()
-- that we can simply collect them in a list.
table.insert(searchMatchEndCols, endCol)
end)
local numOfMatches = #searchMatchEndCols

-- INSERT REPLACEMENTS AS VIRTUAL TEXT
if toReplace ~= "" and #searchMatchEndCols > 0 then
Expand All @@ -121,7 +122,7 @@ function M.incrementalPreview()
end)
end

return #searchMatchEndCols
return numOfMatches
end

--------------------------------------------------------------------------------
Expand Down

0 comments on commit c8852f3

Please sign in to comment.