do_quotes = 1;
if (start_in_quotes == MAYBE)
{
- // Do we need to use at_start here?
- inquote = TRUE;
- start_in_quotes = TRUE;
+ inquote = at_start;
+ if (inquote)
+ start_in_quotes = TRUE;
}
else if (backwards)
inquote = TRUE;
normal [(
call assert_equal([1, 4], [line('.'), col('.')])
+ call setline(1, ['x" (a "b" )\', '")'])
+ call cursor(1, 4)
+ normal %
+ call assert_equal([1, 11], [line('.'), col('.')])
+ normal %
+ call assert_equal([1, 4], [line('.'), col('.')])
+ call cursor(1, 10)
+ normal [(
+ call assert_equal([1, 4], [line('.'), col('.')])
+ call cursor(1, 4)
+ normal ])
+ call assert_equal([1, 11], [line('.'), col('.')])
+
" matching parenthesis in 'virtualedit' mode with cursor after the eol
call setline(1, 'abc(defgh)')
set virtualedit=all
normal 0di)
call assert_equal('foo ()', getline(1))
+ call setline(1, ['x" (a "b" )\', '")'])
+ call cursor(1, 6)
+ normal va)y
+ call assert_equal('(a "b" )', @")
+
+ call setline(1, ['x" [a "b" ]\', '"]'])
+ call cursor(1, 6)
+ normal va]y
+ call assert_equal('[a "b" ]', @")
+
bw!
endfunc