change fastwrap behaviour (#153)

* feat: (fastwrap) auto_move
This commit is contained in:
howoz 2021-10-14 14:13:51 +03:00 committed by GitHub
parent 823e469f6f
commit 2c296bd6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,7 @@ Before Input After
``` lua
require('nvim-autopairs').disable()
require('nvim-autopairs').enable()
require('nvim-autopairs').remove_rule('(')-- remove rule (
require('nvim-autopairs').remove_rule('(') -- remove rule (
require('nvim-autopairs').clear_rules() -- clear all rule
require('nvim-autopairs').get_rule('"') -- get rule " then modify it

View File

@ -77,7 +77,7 @@ M.show = function(line)
M.highlight_wrap(list_pos, row)
vim.defer_fn(function()
local char = M.getchar_handler()
local char = #list_pos == 1 and config.end_key or M.getchar_handler()
for _, pos in pairs(list_pos) do
if char == pos.key then
M.move_bracket(line, pos.col, end_pair, pos.char)