Skip to content

Commit

Permalink
fix(util): crlf. Fixes #518
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 23, 2024
1 parent 82042f7 commit 032fa2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/trouble/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ function M.get_lines(opts)

for row, line in M.lines(data) do
if not opts.rows or ret[row] then
if line:sub(-1) == "\r" then
line = line:sub(1, -2)
end
todo = todo - 1
ret[row] = line
if todo == 0 then
Expand Down

0 comments on commit 032fa2c

Please sign in to comment.