Home Explore Blog CI



neovim

3rd chunk of `runtime/doc/dev_vimpatch.txt`
4d935e42481f0739475ffcd01bf754b2b94946d56c756eaf0000000100000fa0
 `test_popupwin.vim`, `test_popupwin_textprop.vim`:
  https://github.com/neovim/neovim/pull/12741#issuecomment-704677141
- json changes: incompatible API https://github.com/neovim/neovim/pull/4131
    - NA files: `src/json*`, `src/testdir/test_json.vim`
- `test_restricted.vim` restricted mode is removed in
  https://github.com/neovim/neovim/pull/11996
- Many tests in `test_prompt_buffer.vim` require incompatible Vim features
  such as `channel`; they should still be included, but skipped
- non-runtime documentation: Moved to https://neovim.io/doc/,
    - NA files: `Filelist`, `README`, `INSTALL`,
- Anything else might be relevant; err on the side of caution, and post an
  issue if you aren't sure.

==============================================================================
VERSION.C                                          *dev-vimpatch-version.c*

The list of Vim patches in `src/nvim/version.c` is automatically updated
https://github.com/neovim/neovim/pull/7780 based on the presence of
`vim-patch:xxx` tokens in the Nvim git log.

- Don't update `src/nvim/version.c` yourself.
    - `scripts/vim-patch.sh -p` intentionally omits `version.c` to avoid merge
      conflicts and save time when porting a patch.
- The automation script (`scripts/vimpatch.lua`) only recognizes tokens like
  `vim-patch:8.0.1206`, not `vim-patch:<hash>`.

==============================================================================
CODE DIFFERENCES                            *dev-vimpatch-code-differences*

The following functions have been removed or deprecated in favor of newer
alternatives. See `memory.c`
https://github.com/neovim/neovim/blob/master/src/nvim/memory.c for more
information.
>
  -----------------------------------------------------------------------
  Deprecated or removed                                 Replacement
  -----------------------------------------------------------------------
  vim_free                                                 xfree
  VIM_CLEAR(&foo)                                    XFREE_CLEAR(foo)
  malloc alloc lalloc lalloc_id ALLOC_ONE                 xmalloc
  calloc lalloc_clear                                     xcalloc
  realloc vim_realloc                                    xrealloc
  mch_memmove                                             memmove
  vim_memset copy_chars copy_spaces                       memset
  vim_strbyte                                             strchr
  vim_strncpy strncpy                               xstrlcpy/xmemcpyz
  vim_strcat strncat                                     xstrlcat
  VIM_ISWHITE                                          ascii_iswhite
  IS_WHITE_OR_NUL                                  ascii_iswhite_or_nul
  IS_WHITE_NL_OR_NUL                              ascii_iswhite_nl_or_nul
  vim_isalpha                                           mb_isalpha
  vim_isNormalIDc                                      ascii_isident
  vim_islower vim_isupper                          mb_islower mb_isupper
  vim_tolower vim_toupper                          mb_tolower mb_toupper
  mb_ptr2len                                           utfc_ptr2len
  mb_ptr2len_len                                     utfc_ptr2len_len
  mb_char2len                                          utf_char2len
  mb_char2bytes                                       utf_char2bytes
  mb_ptr2cells                                         utf_ptr2cells
  mb_ptr2cells_len                                   utf_ptr2cells_len
  mb_char2cells                                       utf_char2cells
  mb_off2cells                                         utf_off2cells
  mb_ptr2char                                          utf_ptr2char
  mb_head_off                                          utf_head_off
  mb_tail_off                                          utf_cp_bounds
  mb_strnicmp2                                         utf_strnicmp
  MB_STRNICMP2                                         utf_strnicmp
  mb_lefthalve               

Title: Version File Updates and Code Differences in Nvim
Summary
This section details how the `src/nvim/version.c` file is automatically updated with Vim patch information based on the `vim-patch:xxx` tokens in the Nvim git log. It emphasizes that manual updates to `version.c` should be avoided. Additionally, it provides a list of deprecated or removed functions in Nvim, along with their recommended replacements, focusing on functions related to memory management and string manipulation.