Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smoother custom pairs #403

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lua/nvim-autopairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ M.autopairs_map = function(bufnr, char)
if M.config.enable_abbr then
result = utils.esc(utils.key.abbr) .. result
end
-- don't redraw the cursor twice
local old_lazyredraw = vim.o.lazyredraw
vim.o.lazyredraw = true
result = result .. utils.esc("<cmd>lua vim.o.lazyredraw =" .. (old_lazyredraw and "true" or "false") .. "<cr>")
log.debug("key_map :" .. result)
return result
end
Expand Down