mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0615: regexp benchmark stest is old style
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 #5963)
This commit is contained in:
@@ -176,6 +176,13 @@ set_buffer_lines(
|
||||
if (lines->v_type == VAR_LIST)
|
||||
{
|
||||
l = lines->vval.v_list;
|
||||
if (l == NULL || list_len(l) == 0)
|
||||
{
|
||||
// set proper return code
|
||||
if (lnum > curbuf->b_ml.ml_line_count)
|
||||
rettv->vval.v_number = 1; // FAIL
|
||||
goto done;
|
||||
}
|
||||
range_list_materialize(l);
|
||||
li = l->lv_first;
|
||||
}
|
||||
@@ -251,6 +258,7 @@ set_buffer_lines(
|
||||
update_topline();
|
||||
}
|
||||
|
||||
done:
|
||||
if (!is_curbuf)
|
||||
{
|
||||
curbuf = curbuf_save;
|
||||
|
Reference in New Issue
Block a user