This commit is contained in:
hrsh7th
2021-10-19 14:47:41 +09:00
parent c57969580d
commit 775a371660
2 changed files with 2 additions and 2 deletions

View File

@@ -311,7 +311,7 @@ core.confirm = function(self, e, option, callback)
local confirm = {} local confirm = {}
table.insert(confirm, keymap.backspace(ctx.cursor.character - misc.to_utfindex(e.context.cursor_before_line, e:get_offset()))) table.insert(confirm, keymap.backspace(ctx.cursor.character - misc.to_utfindex(e.context.cursor_before_line, e:get_offset())))
table.insert(confirm, e:get_word()) table.insert(confirm, e:get_word())
keymap.feedkeys(table.concat(confirm, ''), 'n', function() keymap.feedkeys(table.concat(confirm, ''), 'nt', function()
-- Restore to the requested state. -- Restore to the requested state.
local restore = {} local restore = {}
table.insert(restore, keymap.backspace(vim.str_utfindex(e:get_word()))) table.insert(restore, keymap.backspace(vim.str_utfindex(e:get_word())))

View File

@@ -260,7 +260,7 @@ misc.set(_G, { 'cmp', 'utils', 'keymap', 'listen', 'run' }, function(id)
definition.callback( definition.callback(
definition.keys, definition.keys,
misc.once(function() misc.once(function()
vim.api.nvim_feedkeys(keymap.t(definition.fallback), 'i', true) vim.api.nvim_feedkeys(keymap.t(definition.fallback), 'it', true)
end) end)
) )
return keymap.t('<Ignore>') return keymap.t('<Ignore>')