vim-patch:8.2.0615: regexp benchmark stest is old style (#20940)

Problem:    Regexp benchmark stest is old style.
Solution:   Make it a new style test.  Fix using a NULL list.  Add more tests.
            (Yegappan Lakshmanan, closes vim/vim#5963)

ad48e6c159

N/A patches:
vim-patch:9.0.0829: wrong counts in macro comment
This commit is contained in:
zeertzjq
2022-11-05 12:26:17 +08:00
committed by GitHub
parent daf9a63d67
commit a86295cd5c
10 changed files with 91 additions and 6 deletions

View File

@@ -5581,6 +5581,13 @@ void set_buffer_lines(buf_T *buf, linenr_T lnum_arg, bool append, const typval_T
const char *line = NULL;
if (lines->v_type == VAR_LIST) {
l = lines->vval.v_list;
if (l == NULL || tv_list_len(l) == 0) {
// set proper return code
if (lnum > curbuf->b_ml.ml_line_count) {
rettv->vval.v_number = 1; // FAIL
}
goto done;
}
li = tv_list_first(l);
} else {
line = tv_get_string_chk(lines);
@@ -5651,6 +5658,7 @@ void set_buffer_lines(buf_T *buf, linenr_T lnum_arg, bool append, const typval_T
update_topline(curwin);
}
done:
if (!is_curbuf) {
curbuf = curbuf_save;
curwin = curwin_save;