Problem: Trailing backslash may cause reading past end of line.
Solution: Check for NUL after backslash.
call assert_equal("<div><div\nattr=\"attr\"\n></div></div>", @", e)
set quoteescape&
+
+ " this was going beyond the end of the line
+ %del
+ sil! norm \16i"\
+ sil! norm \16i"\
+ sil! norm \16i"\
+ call assert_equal('"\', getline(1))
+
+ bwipe!
endfor
set enc=utf-8
- bwipe!
endfunc
func Test_empty_html_tag()
if (c == NUL)
return -1;
else if (escape != NULL && vim_strchr(escape, c))
+ {
++col;
+ if (line[col] == NUL)
+ return -1;
+ }
else if (c == quotechar)
break;
if (has_mbyte)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4925,
/**/
4924,
/**/