Problem: Reading beyond end of line ending in quote and backslash.
Solution: Check for non-NUL after backslash. (closes #8964)
{
if (p[0] == '\'') // 'c' or '\n' or '\000'
{
- if (!p[1]) // ' at end of line
+ if (p[1] == NUL) // ' at end of line
break;
i = 2;
- if (p[1] == '\\') // '\n' or '\000'
+ if (p[1] == '\\' && p[2] != NUL) // '\n' or '\000'
{
++i;
while (vim_isdigit(p[i - 1])) // '\000'
enew! | close
endfunc
+func Test_backslash_at_end_of_line()
+ new
+ exe "norm v>O'\\\<C-m>-"
+ exe "norm \<C-q>="
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3482,
/**/
3481,
/**/