File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1+ local util = require " easycomplete.util"
2+ local console = util .console
13local autopair = require " easycomplete.autopair"
24local M = {}
35
@@ -27,10 +29,9 @@ function M.init_once()
2729
2830 if vim .g .AutoPairsMapSpace and vim .g .AutoPairsMapSpace == 1 then
2931 vim .on_key (function (keys , _ )
30- if vim .api .nvim_get_mode ().mode == " c" then
31- return
32+ if vim .api .nvim_get_mode ().mode == " c" and vim . fn . getcmdtype () == " = " then
33+ autopair . hack_pair_input ( keys )
3234 end
33- autopair .hack_pair_input (keys )
3435 end )
3536 end
3637end
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ local console = util.console
44local M = {}
55local input_chars_vec = {}
66local auto_pair_funcs = {
7- " = AutoPairsInsert("
7+ " AutoPairsInsert("
88}
99
1010local function match_autopair_func ()
@@ -16,6 +16,9 @@ local function match_autopair_func()
1616 break
1717 end
1818 end
19+ if matched then
20+ input_chars_vec = {}
21+ end
1922 return matched
2023end
2124
You can’t perform that action at this time.
0 commit comments