@@ -73,6 +73,7 @@ M.show = function(line)
73 if i == str_length then
73 if i == str_length then
74 is_end_key = false
74 is_end_key = false
75 key = config.end_key
75 key = config.end_key
77 table.insert(
78 table.insert(
@@ -110,11 +111,11 @@ M.show = function(line)
112M.move_bracket = function(line, target_pos, end_pair, change_pos)
113M.move_bracket = function(line, target_pos, end_pair, change_pos)
114+ log.debug(target_pos)
113 line = line or utils.text_get_current_line(0)
115 line = line or utils.text_get_current_line(0)
114 local row, col = utils.get_cursor()
116 local row, col = utils.get_cursor()
115 local _, next_char = utils.text_cusor_line(line, col, 1, 1, false)
117 local _, next_char = utils.text_cusor_line(line, col, 1, 1, false)
116 -- remove an autopairs if that exist
118 -- remove an autopairs if that exist
117− -- ((fsadfsa)) dsafdsa
118 if next_char == end_pair then
119 if next_char == end_pair then
119 line = line:sub(1, col) .. line:sub(col + 2, #line)
120 line = line:sub(1, col) .. line:sub(col + 2, #line)
120 target_pos = target_pos - 1
121 target_pos = target_pos - 1