This commit is contained in:
hrsh7th
2022-01-15 18:56:29 +09:00
parent bce1b2d780
commit 098182e2c2
3 changed files with 11 additions and 4 deletions

View File

@@ -314,10 +314,10 @@ custom_entries_view._insert = setmetatable({
local cursor = api.get_cursor()
local length = vim.fn.strchars(string.sub(api.get_current_line(), self.offset, cursor[2]), true)
local keys = {}
table.insert(keys, keymap.t('<Cmd>set indentkeys=<CR>'))
table.insert(keys, keymap.indentkeys())
table.insert(keys, keymap.backspace(length))
table.insert(keys, word)
table.insert(keys, keymap.t('<Cmd>set indentkeys=%s<CR>'):format(vim.fn.escape(vim.bo.indentkeys, ' "|\\')))
table.insert(keys, keymap.indentkeys(vim.bo.indentkeys))
feedkeys.call(
table.concat(keys, ''),
'int',