@@ -66,9 +66,16 @@ M.show = function(line)
6666 then
6767 local key = config.keys:sub(index, index)
6868 index = index + 1
69− if utils.is_quote(char) then
69+ if
70+ utils.is_quote(char)
71+ or (
72+ utils.is_close_bracket(char)
73+ and utils.is_in_quotes(line, col, prev_char)
74+ )
75+ then
7076 offset = 0
7177 end
78+
7279 if i == str_length then
7380 is_end_key = false
7481 key = config.end_key
@@ -94,7 +101,7 @@ M.show = function(line)
94101 vim.api.nvim_buf_clear_namespace(0, M.ns_fast_wrap, row, row + 1)
95102 for _, pos in pairs(list_pos) do
96103 if char == pos.key then
97− M.move_bracket(line, pos.col, end_pair,false)
104+ M.move_bracket(line, pos.col, end_pair, false)
98105 break
99106 end
100107 if char == string.upper(pos.key) then
@@ -122,8 +129,8 @@ M.move_bracket = function(line, target_pos, end_pair, change_pos)
122129
123130 line = line:sub(1, target_pos) .. end_pair .. line:sub(target_pos + 1, #line)
124131 vim.api.nvim_set_current_line(line)
125− if change_pos then
126− vim.api.nvim_win_set_cursor(0,{row + 1, target_pos})
132+ if change_pos then
133+ vim.api.nvim_win_set_cursor(0, { row + 1, target_pos })
127134 end
128135end
129136