Skip to content

Commit

Permalink
fix: undelete Mdelete
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuuon committed Feb 20, 2024
1 parent 00c02e2 commit 8b5416c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lua/model/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ local function setup_commands()
force = true,
})

vim.api.nvim_create_user_command('Mdelete', function()
local seg = segment.query(util.cursor.position())
if seg then
flash(6, 80, seg, 'DiffDelete', function()
seg.delete()
end)
end
end, {
range = true,
desc = 'Delete the completion under the cursor, replacing with original text if replacement',
force = true,
})

vim.api.nvim_create_user_command('Mshow', function()
local seg = segment.query(util.cursor.position())
if seg then
Expand Down

0 comments on commit 8b5416c

Please sign in to comment.