linenr_T lnum = rex.reg_firstlnum + rex.lnum;
long_u vcol = 0;
- if (lnum > 0 && lnum <= wp->w_buffer->b_ml.ml_line_count)
+ if (lnum >= 0 && lnum <= wp->w_buffer->b_ml.ml_line_count)
vcol = (long_u)win_linetabsize(wp, lnum, rex.line,
(colnr_T)(rex.input - rex.line));
if (!re_num_cmp(vcol + 1, scan))
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);
func Test_equivalence_re1()
set re=1
call s:equivalence_test()
+ set re=0
endfunc
func Test_equivalence_re2()
set re=2
call s:equivalence_test()
+ set re=0
endfunc
func Test_recursive_substitute()
let actual = matchlist('abc def', '\(abc\>\)\?\s*\(def\)')
call assert_equal(expected, actual)
endfor
+ set re=0
endfunc
func Test_backref()
prop_type_delete('name')
enddef
+def Test_compare_column_matchstr()
+ enew
+ set re=1
+ call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
+ set re=2
+ call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
+ set re=0
+enddef
+
+
" vim: shiftwidth=2 sts=2 expandtab