vim-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.
df36514a64
This commit is contained in:
Jan Edmund Lazo
2021-05-06 00:52:35 -04:00
parent dad17caa87
commit 296711cfad
4 changed files with 16 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View 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,4 +50,6 @@ function Test_exec_while_if()
\ "7x999999999888888887777777666666555554444333221",
\ "8",
\ "9x"], getline(1, 10))
endfunction
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -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