To: vim_dev@googlegroups.com Subject: Patch 8.2.0160 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0160 (after 8.2.0159) Problem: Range test fails. Solution: Include change in list code. (#5541) Files: src/list.c *** ../vim-8.2.0159/src/list.c 2020-01-26 15:52:33.019833259 +0100 --- src/list.c 2020-01-27 20:52:17.373815525 +0100 *************** *** 1992,1997 **** --- 1992,1998 ---- if ((l = argvars[0].vval.v_list) != NULL) { + range_list_materialize(l); li = l->lv_first; if (argvars[2].v_type != VAR_UNKNOWN) { *************** *** 2256,2261 **** --- 2257,2272 ---- && !var_check_lock(l->lv_lock, (char_u *)N_("reverse() argument"), TRUE)) { + if (l->lv_first == &range_list_item) + { + varnumber_T new_start = l->lv_start + + (l->lv_len - 1) * l->lv_stride; + l->lv_end = new_start - (l->lv_end - l->lv_start); + l->lv_start = new_start; + l->lv_stride = -l->lv_stride; + rettv_list_set(rettv, l); + return; + } li = l->lv_last; l->lv_first = l->lv_last = NULL; l->lv_len = 0; *** ../vim-8.2.0159/src/version.c 2020-01-27 22:09:35.800838603 +0100 --- src/version.c 2020-01-27 22:37:08.841683039 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 160, /**/ -- I learned the customs and mannerisms of engineers by observing them, much the way Jane Goodall learned about the great apes, but without the hassle of grooming. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///