Skip to content

Commit

Permalink
fixing some lua files
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Badragan committed May 21, 2024
1 parent 6c395e6 commit 9afa711
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
12 changes: 4 additions & 8 deletions lua/grug-far/actions/qflist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@ local function qflist(params)
local search = state.inputs.search

vim.fn.setqflist(resultsLocations, 'r')
vim.fn.setqflist(
{},
'a',
{
title = 'Grug FAR results'
.. utils.strEllideAfter(search, context.options.maxSearchCharsInTitles, ' for: '),
}
)
vim.fn.setqflist({}, 'a', {
title = 'Grug FAR results'
.. utils.strEllideAfter(search, context.options.maxSearchCharsInTitles, ' for: '),
})
-- open list below taking whole horizontal space
vim.cmd('botright copen | stopinsert')
end
Expand Down
13 changes: 5 additions & 8 deletions lua/grug-far/render/resultsHeader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@ local function renderInfoLine(buf, context, headerRow)

local stats = context.state.stats
if stats and stats.matches > 0 then
table.insert(
virt_lines,
table.insert(virt_lines, {
{
{
' ' .. stats.matches .. ' matches in ' .. stats.files .. ' files' .. ' ',
'GrugFarResultsStats',
},
}
)
' ' .. stats.matches .. ' matches in ' .. stats.files .. ' files' .. ' ',
'GrugFarResultsStats',
},
})
end

local actionMessage = context.state.actionMessage
Expand Down
5 changes: 3 additions & 2 deletions lua/grug-far/rg/fetchWithRg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ local function fetchWithRg(params)
stdio = { nil, stdout, stderr },
cwd = vim.fn.getcwd(),
args = args,
}, function(code -- signal
)
}, function(
code -- ,signal
)
if finished then
return
end
Expand Down

0 comments on commit 9afa711

Please sign in to comment.