fix: Fix options

This commit is contained in:
Jan K9f 2025-07-28 19:38:35 +02:00
commit 9a9a8dfe0a
Signed by: jank
GPG key ID: 22BEAC760B3333D6

View file

@ -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