Contributing guidelines
Module(s)
mini.pairs
Neovim version
0.12.x
Description
If the current line contains a null control character, when you try to delete any character on that same line with the v:lua.MiniPairs.bs() function, nvim will show this error:
E5108: Lua: Vim:E976: Using a Blob as a String
stack traceback:
[C]: in function 'get_neigh'
.../.local/share/nvim/lazy/mini.pairs/lua/mini/pairs.lua:359: in function <.../.local/share/nvim/lazy/mini.pairs/lua/mini/pairs.lua:358>
and insert a literal '0' ascii instead.
This happens in both INSERT and REPLACE mode.
Other control chars do not display this behaviour.
Doen't happen in command mode.
Reproduction
-
Create separate 'nvim-repro' config directory:
- '~/.config/nvim-repro/' on Unix
- '~/AppData/Local/nvim-repro/' on Windows
-
Inside 'nvim-repro' directory create a file named 'init.lua'.
Populate it with the following content:
-- Clone latest 'mini.nvim' (requires Git CLI installed)
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local mini_path = vim.fn.stdpath('data') .. '/site/pack/deps/start/mini.nvim'
local clone_cmd = { 'git', 'clone', '--depth=1', 'https://github.com/nvim-mini/mini.nvim', mini_path }
vim.fn.system(clone_cmd)
vim.cmd('echo "`mini.nvim` is installed" | redraw')
-- Make sure 'mini.nvim' is available
vim.cmd('packadd mini.nvim')
require('mini.deps').setup()
-
Run NVIM_APPNAME=nvim-repro nvim (i.e. execute nvim with NVIM_APPNAME environment variable set to "nvim-repro").
Wait for all dependencies to install.
-
Open a file and insert a line containing a null character with <c-v>000 for example
-
On that line, press backspace while insert mode.
Contributing guidelines
mainbranchModule(s)
mini.pairs
Neovim version
0.12.x
Description
If the current line contains a null control character, when you try to delete any character on that same line with the v:lua.MiniPairs.bs() function, nvim will show this error:
and insert a literal '0' ascii instead.
This happens in both INSERT and REPLACE mode.
Other control chars do not display this behaviour.
Doen't happen in command mode.
Reproduction
Create separate 'nvim-repro' config directory:
Inside 'nvim-repro' directory create a file named 'init.lua'.
Populate it with the following content:
Run
NVIM_APPNAME=nvim-repro nvim(i.e. executenvimwithNVIM_APPNAMEenvironment variable set to "nvim-repro").Wait for all dependencies to install.
Open a file and insert a line containing a null character with
<c-v>000for exampleOn that line, press backspace while insert mode.