fix moveright on quote

This commit is contained in:
windwp 2021-05-20 21:14:41 +07:00
parent 84c0c3159c
commit 1eaaeb145d
2 changed files with 7 additions and 1 deletions

View File

@ -128,7 +128,7 @@ cond.move_right = function ()
end
-- ("|") => (""|)
-- "" |" " => "" "| "
if utils.is_in_quote(opts.text, opts.col - 1, opts.char) then
if utils.is_in_quote(opts.line, opts.col, opts.char) then
return true
end
end

View File

@ -154,6 +154,12 @@ local data = {
after = [[("abcd"|)]]
},
{
name = "move right when inside quote" ,
key = [["]],
before = [[foo("|")]],
after = [[foo(""|)]]
},
{
name = "move right square bracket" ,
key = [[)]],