Skip to content

Commit

Permalink
fix(incrementalPreview): highlight error when no matches
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Jun 5, 2024
1 parent 463a88c commit 50d3132
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 @@ -68,7 +68,7 @@ end
---@return Iter { lnum: number, col: number, text: string }
local function rgResultsIter(rgArgs)
local rgResult = runRipgrep(rgArgs)
if rgResult.code ~= 0 then return {} end
if rgResult.code ~= 0 then return vim.iiter({}) end -- empty iter on error
local rgLines = vim.split(vim.trim(rgResult.stdout), "\n")

local state = require("rip-substitute.state").state
Expand Down

0 comments on commit 50d3132

Please sign in to comment.