diff --git a/lua/jquote/init.lua b/lua/jquote/init.lua index 8f71388..e505737 100644 --- a/lua/jquote/init.lua +++ b/lua/jquote/init.lua @@ -19,7 +19,7 @@ end --- @param char string The character to check. --- @return boolean true if the character is a quote character, false otherwise. local function is_defined_quote_char(char) - for _, qc in ipairs(M.quote_chars) do + for _, qc in ipairs(M.options.quote_chars) do if char == qc then return true end @@ -77,7 +77,7 @@ end --- @return string The next quote character, or nil if current_char is not found. local function get_next_quote_char(current_char) local current_char_list_index = -1 - for i, qc in ipairs(M.quote_chars) do + for i, qc in ipairs(M.options.quote_chars) do if qc == current_char then current_char_list_index = i break @@ -88,8 +88,8 @@ local function get_next_quote_char(current_char) return nil -- Current character not in our defined list. end - local next_char_list_index = (current_char_list_index % #M.quote_chars) + 1 - return M.quote_chars[next_char_list_index] + local next_char_list_index = (current_char_list_index % #M.options.quote_chars) + 1 + return M.options.quote_chars[next_char_list_index] end --- Toggles the quotes around the string at the cursor position