mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
feat(picker): new native diff mode (disabled by default). Can be used to show delta diffs for undo. Closes #1288
This commit is contained in:
parent
74c42985be
commit
d6a38acbf5
4 changed files with 43 additions and 11 deletions
|
@ -385,10 +385,7 @@ function M.undo(opts, ctx)
|
|||
item.removed_lines = table.concat(removed_lines, "\n")
|
||||
item.added = #added_lines
|
||||
item.removed = #removed_lines
|
||||
item.preview = {
|
||||
text = diff,
|
||||
ft = "diff",
|
||||
}
|
||||
item.diff = diff
|
||||
end
|
||||
|
||||
---@param entries? vim.fn.undotree.entry[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue