was renamed to `ga_init` and the original `ga_init` is
gone.
- "Old style" Vim tests (`src/testdir/*.in`) should be converted to Lua tests
(see #1286 https://github.com/neovim/neovim/issues/1286 and #1328
https://github.com/neovim/neovim/pull/1328). See Checklist for migrating
legacy tests
https://github.com/neovim/neovim/blob/master/test/README.md#checklist-for-migrating-legacy-tests.
- However, please do not convert "new style" Vim tests
(`src/testdir/*.vim`) to Lua. The "new style" Vim tests are faster than
the old ones, and converting them takes time and effort better spent
elsewhere. Just copy them to `test/old/testdir/*.vim`.
- Conditions that check `enc_utf8` or `has_mbyte` are obsolete (only the
"true" case is applicable).
- `enc_utf8` and `has_mbyte` macros were removed in
https://github.com/neovim/neovim/pull/13293
- Check for `CSI` in typeahead buffer is only necessary in Vim with
`FEAT_GUI`. `CSI` does not have a special meaning in typeahead buffer in
Nvim. (also see https://github.com/neovim/neovim/pull/16936)
==============================================================================
LIST MANAGEMENT *dev-vimpatch-list-management*
Management of lists (types `list_T` and `listitem_T` from vim) was changed in
https://github.com/neovim/neovim/pull/7708/. There is a lint against the "old"
usage, but here are the most important changes.
Declarations for the table
- `list_T list`: a list
- `listitem_T li`: an item of `list`
- `int val` a value for `lv_copyID`
>
--------------------------------------------------------------------------------------
Old New Comment
------------------------------- ------------------------------------------------------
list->lv_first tv_list_first(list)
list->lv_last tv_list_last(list)
li->li_next TV_LIST_ITEM_NEXT(list, li) To be avoided if possible, must use list which li belongs to.
li->li_prev TV_LIST_ITEM_PREV(list, li) To be avoided if possible, must use list which li belongs to.
Suggestion by @ZyX-l: Use TV_LIST_ITER or indexing instead of the previous two calls.
list->lv_len tv_list_len(list)
list->lv_lock tv_list_locked(list)
&li->li_tv TV_LIST_ITEM_TV(li)
list->lv_refcount++ tv_list_ref(list)
val = list->lv_copyID val = tv_list_copyid(list)
list->lv_copyID = val tv_list_set_copyid(list, val)
for (li = list->lv_first; TV_LIST_ITER_CONST(list, li, Use TV_LIST_ITER(...) if you need to
li != NULL && another_cond; { if (another_cond) {break;} code}) modify list items (note: assigning copyID is also modification and this happens
li = li->li_next) code always when recursively traversing a list).
--------------------------------------------------------------------------------------