Mercurial > vim
changeset 24580:87ff80c08e4b v8.2.2829
patch 8.2.2829: some comments are not correct or clear
Commit: https://github.com/vim/vim/commit/df36514a6455342e178af693553ef9df9fcf8c83
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 3 20:01:45 2021 +0200
patch 8.2.2829: some comments are not correct or clear
Problem: Some comments are not correct or clear.
Solution: Adjust the comments. Add test for cursor position.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 03 May 2021 20:15:04 +0200 |
parents | dd22ab1cb899 |
children | 4cb7be47fa3d |
files | src/regexp_bt.c src/regexp_nfa.c src/testdir/test_exec_while_if.vim src/testdir/test_substitute.vim src/version.c |
diffstat | 5 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/regexp_bt.c +++ b/src/regexp_bt.c @@ -4764,7 +4764,7 @@ regtry( /* * 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()). * Returns 0 for failure, number of lines contained in the match otherwise. */ static long
--- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -7287,7 +7287,7 @@ nfa_regtry( /* * 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()). * * Returns <= 0 for failure, number of lines contained in the match otherwise. */
--- a/src/testdir/test_exec_while_if.vim +++ b/src/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,6 +50,6 @@ function Test_exec_while_if() \ "7x999999999888888887777777666666555554444333221", \ "8", \ "9x"], getline(1, 10)) -endfunction +endfunc " vim: shiftwidth=2 sts=2 expandtab
--- a/src/testdir/test_substitute.vim +++ b/src/testdir/test_substitute.vim @@ -926,4 +926,13 @@ func Test_substitute_multiline_submatch( close! 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