]> granicus.if.org Git - vim/commitdiff
patch 8.2.2829: some comments are not correct or clear v8.2.2829
authorBram Moolenaar <Bram@vim.org>
Mon, 3 May 2021 18:01:45 +0000 (20:01 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 3 May 2021 18:01:45 +0000 (20:01 +0200)
Problem:    Some comments are not correct or clear.
Solution:   Adjust the comments.  Add test for cursor position.

src/regexp_bt.c
src/regexp_nfa.c
src/testdir/test_exec_while_if.vim
src/testdir/test_substitute.vim
src/version.c

index 70eab25b347070c7787812b6f62693c28e3cce48..afea5e4cb5b8486afebd6b77ea91e69180cb505c 100644 (file)
@@ -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
index 9edca8191286c347589c7be565c84404a47c79c3..a519b85374fd873153814856a8132b779d6bed76 100644 (file)
@@ -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.
  */
index 2e21ba07aade72713db7ce0832579edba6ea70e7..3da2784d770d67035f33ec92946d20ad1e362070 100644 (file)
@@ -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
index f38eb55b81fc0240d05d0405ece76262facd4c76..4c99f818706953912b378a04e62f576dff3caeff 100644 (file)
@@ -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
index 444f35fdaae1d47fbe6a094bb61a2944b2105a6a..b2566209459f1644453ce65a69ee4ac4aa950e32 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2829,
 /**/
     2828,
 /**/