updated for version 7.3.1185
Problem: New regexp engine: no match with ^ after \n. (SungHyun Nam)
Solution: Fix it, add a test.
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 780653f..20f7aa3 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -3936,9 +3936,10 @@
case NFA_BOL:
case NFA_BOF:
/* "^" won't match past end-of-line, don't bother trying.
- * Except when we are going to the next line for a look-behind
- * match. */
+ * Except when at the end of the line, or when we are going to the
+ * next line for a look-behind match. */
if (reginput > regline
+ && *reginput != NUL
&& (nfa_endp == NULL
|| !REG_MULTI
|| reglnum == nfa_endp->se_u.pos.lnum))