Save undopoint

This commit is contained in:
hrsh7th
2021-11-05 21:31:10 +09:00
parent e1f880b7e0
commit d9e4ac5997

View File

@@ -314,6 +314,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())
table.insert(confirm, keymap.undobreak())
feedkeys.call(table.concat(confirm, ''), 'nt', next) feedkeys.call(table.concat(confirm, ''), 'nt', next)
-- Restore to the requested state. -- Restore to the requested state.
@@ -388,6 +389,8 @@ core.confirm = function(self, e, option, callback)
}) })
end end
next() next()
-- Finalize
end, function() end, function()
e:execute(vim.schedule_wrap(function() e:execute(vim.schedule_wrap(function()
release() release()