diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/regexp.c | 2 | ||||
-rw-r--r-- | src/nvim/regexp_nfa.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_exec_while_if.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_substitute.vim | 9 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 184f5da97d..e0cc25421a 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -3436,7 +3436,7 @@ static long bt_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf, } /// Match a regexp against a string ("line" points to the string) or multiple -/// lines ("line" is NULL, use reg_getline()). +/// lines (if "line" is NULL, use reg_getline()). /// @return 0 for failure, or number of lines contained in the match. static long bt_regexec_both(char_u *line, colnr_T col, // column to start search diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index b6bcee3fda..923db6422e 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -6491,7 +6491,7 @@ static long nfa_regtry(nfa_regprog_T *prog, } /// Match a regexp against a string ("line" points to the string) or multiple -/// lines ("line" is NULL, use reg_getline()). +/// lines (if "line" is NULL, use reg_getline()). /// /// @param line String in which to search or NULL /// @param startcol Column to start looking for match diff --git a/src/nvim/testdir/test_exec_while_if.vim b/src/nvim/testdir/test_exec_while_if.vim index d6afabff45..3da2784d77 100644 --- a/src/nvim/testdir/test_exec_while_if.vim +++ b/src/nvim/testdir/test_exec_while_if.vim @@ -1,6 +1,6 @@ -" Test for :execute, :while and :if +" Test for :execute, :while, :for and :if -function Test_exec_while_if() +func Test_exec_while_if() new let i = 0 @@ -50,4 +50,6 @@ function Test_exec_while_if() \ "7x999999999888888887777777666666555554444333221", \ "8", \ "9x"], getline(1, 10)) -endfunction +endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_substitute.vim b/src/nvim/testdir/test_substitute.vim index cc3bfe9f7f..32167a45ba 100644 --- a/src/nvim/testdir/test_substitute.vim +++ b/src/nvim/testdir/test_substitute.vim @@ -754,4 +754,13 @@ func Test_submatch_list_concatenate() call assert_equal(substitute('A1', pat, Rep, ''), "[['A1'], ['1']]") endfunc +func Test_substitute_skipped_range() + new + if 0 + /1/5/2/2/\n + endif + call assert_equal([0, 1, 1, 0, 1], getcurpos()) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |