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).
--------------------------------------------------------------------------------------
<
For more details and some more advanced usage, see `typval.h` and `typval.c`.
==============================================================================
DOCUMENTATION DIFFERENCES *dev-vimpatch-documentation*
The following should be removed from all imported documentation, and not be
used in new documentation:
- `{Only when compiled with ...}`: the vast majority of features have been
made non-optional (see https://github.com/neovim/neovim/wiki/Introduction)
==============================================================================
FILETYPE DETECTION *dev-vimpatch-filetype*
Nvim's filetype detection behavior matches Vim, but is implemented as part of
|vim.filetype| (see `$VIMRUNTIME/lua/vim/filetype.lua`). The logic is encoded in
three tables, listed in order of precedence (the first match is returned):
1. `filename` for literal full path or basename lookup;
2. `pattern` for matching filenames or paths against |lua-pattern|s, optimized
for fast