mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.diff): first line of header
This commit is contained in:
parent
311015c531
commit
fb011c257f
1 changed files with 2 additions and 2 deletions
|
|
@ -106,8 +106,8 @@ function M.parse(lines)
|
|||
emit()
|
||||
local file ---@type string?
|
||||
if text:find("^diff") then
|
||||
text = text:gsub("^diff%s*", ""):gsub("^%-%S+%s*", "")
|
||||
file = text:match('^"%a/(.-)"') or text:match("^%a/(.-) %a/") or text:match("^%a/(.*)$") or text
|
||||
file = text:gsub("^diff%s*", ""):gsub("^%-%S+%s*", "")
|
||||
file = file:match('^"%a/(.-)"') or file:match("^%a/(.-) %a/") or file:match("^%a/(.*)$") or file
|
||||
elseif text:find("^%-%-%-") then
|
||||
file = text:match("^%-%-%- %a/([^\t]+)") or text:match("^%-%-%- ([^\t]+)")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue