mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(picker.proc): correct offset for carriage returns. Fixes #599
This commit is contained in:
parent
0b67934bb9
commit
a01e0f5368
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ function M.proc(opts)
|
|||
while from <= #data do
|
||||
local nl = data:find("\n", from, true)
|
||||
if nl then
|
||||
local cr = data:byte(nl - 2, nl - 2) == 13 -- \r
|
||||
local cr = data:byte(nl - 1, nl - 1) == 13 -- \r
|
||||
local line = data:sub(from, nl - (cr and 2 or 1))
|
||||
if prev then
|
||||
line, prev = prev .. line, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue