patch 9.0.0407: matchstr() does match column offset
Problem: matchstr() does match column offset. (Yasuhiro Matsumoto)
Solution: Accept line number zero. (closes #10938)
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index f8717f5..b398489 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6778,7 +6778,7 @@
linenr_T lnum = rex.reg_firstlnum + rex.lnum;
long_u vcol = 0;
- if (lnum > 0
+ if (lnum >= 0
&& lnum <= wp->w_buffer->b_ml.ml_line_count)
vcol = (long_u)win_linetabsize(wp, lnum,
rex.line, col);