chore: simplify
This commit is contained in:
7 files changed
+49
-137
No files matched your search
@@ -11,6 +11,13 @@ local function show(buf_id, items, query)
|
||||
end
|
||||
end
|
||||
|
||||
-- Diff current file against the index (staged version)
|
||||
local function diff()
|
||||
vim.cmd.diffthis()
|
||||
vim.cmd('vert Git show :./%')
|
||||
vim.cmd.diffthis()
|
||||
end
|
||||
|
||||
-- Deleted files can't be opened, so choosing one stages the deletion instead
|
||||
local function choose(item)
|
||||
if vim.uv.fs_stat(item.path) then return MiniPick.default_choose(item) end
|
||||
@@ -18,6 +25,7 @@ local function choose(item)
|
||||
end
|
||||
|
||||
return {
|
||||
diff = diff,
|
||||
status = function()
|
||||
local lines = vim.fn.systemlist('git -c core.quotepath=false status -s -u')
|
||||
if vim.v.shell_error ~= 0 then
|
||||
|
||||
Reference in new issue
Block a user