summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-03 20:01:45 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-03 20:01:45 +0200
commitdf36514a6455342e178af693553ef9df9fcf8c83 (patch)
tree4acc1d74a3bd59c2b226817d12b94daa9752b54d
parent97a6c6a1fb6043fd6520fbaaafc6970334186167 (diff)
downloadvim-git-8.2.2829.tar.gz
patch 8.2.2829: some comments are not correct or clearv8.2.2829
Problem: Some comments are not correct or clear. Solution: Adjust the comments. Add test for cursor position.
-rw-r--r--src/regexp_bt.c2
-rw-r--r--src/regexp_nfa.c2
-rw-r--r--src/testdir/test_exec_while_if.vim6
-rw-r--r--src/testdir/test_substitute.vim9
-rw-r--r--src/version.c2
5 files changed, 16 insertions, 5 deletions
diff --git a/src/regexp_bt.c b/src/regexp_bt.c
index 70eab25b3..afea5e4cb 100644
--- 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
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 9edca8191..a519b8537 100644
--- 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.
*/
diff --git a/src/testdir/test_exec_while_if.vim b/src/testdir/test_exec_while_if.vim
index 2e21ba07a..3da2784d7 100644
--- 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
diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
index f38eb55b8..4c99f8187 100644
--- 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
diff --git a/src/version.c b/src/version.c
index 444f35fda..b25662094 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2829,
+/**/
2828,
/**/
2827,