Skip to content

Commit

Permalink
fix(quickfix): populated with a single line
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Aug 2, 2024
1 parent 44b74ba commit 7da155a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.1.4] - 2024-08-02

### Fixed

- LSP (runnables/quickfix executor): Quickfix list populated with a single line.

## [5.1.3] - 2024-08-02

### Fixed
Expand Down
7 changes: 4 additions & 3 deletions lua/rustaceanvim/executors/quickfix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ local function scroll_qf()
end
end

local function append_qf(line)
vim.fn.setqflist({}, 'a', { lines = { line } })
---@param lines string[]
local function append_qf(lines)
vim.fn.setqflist({}, 'a', { lines = { lines } })
scroll_qf()
end

Expand Down Expand Up @@ -38,7 +39,7 @@ local M = {
%s
%s
]]):format(sc.stdout or '', sc.stderr or '')
append_qf(data)
append_qf(vim.split(data, '\n'))
end)
)
end,
Expand Down

0 comments on commit 7da155a

Please sign in to comment.