image.nvim
image.nvim copied to clipboard
Statusline hidden if cmdheight = 0
Description
The statuslines at the bottom (not all statusline, only the statuslines of the bottom windows) is not shown when image.nvim is loaded.
Minimal repro config
local tmp = '/tmp'
local data = tmp .. '/' .. (vim.env.NVIM_APPNAME or 'nvim')
local package_root = data .. '/site'
local clone_root = package_root .. '/pack/packages/start'
local clone_info = {
{
path = clone_root .. '/image.nvim',
url = 'https://github.com/3rd/image.nvim.git',
},
}
vim.fn.mkdir(clone_root, 'p')
vim.opt.pp:prepend(package_root)
vim.opt.rtp:prepend(package_root)
vim.opt.mousemoveevent = true
for _, info in ipairs(clone_info) do
if not vim.loop.fs_stat(info.path) then
vim.notify('cloning ' .. info.url, vim.log.levels.INFO)
vim.fn.system({ 'git', 'clone', info.url, info.path })
end
end
package.path = package.path
.. ';'
.. vim.fn.expand('$HOME')
.. '/.luarocks/share/lua/5.1/?/init.lua;'
package.path = package.path
.. ';'
.. vim.fn.expand('$HOME')
.. '/.luarocks/share/lua/5.1/?.lua;'
vim.opt.cmdheight = 0
vim.opt.number = true
vim.opt.conceallevel = 2
vim.opt.winbar = 'image.nvim demo'
vim.opt.signcolumn = 'yes:2'
require('image').setup({
backend = 'ueberzug',
window_overlap_clear_enabled = true,
tmux_show_only_in_active_window = true,
window_overlap_clear_ft_ignore = {},
max_width = 80,
max_height = 12,
max_width_window_percentage = math.huge,
max_height_window_percentage = math.huge,
})
local content = [[
# Hello World
![This is a remote image](https://gist.ro/s/remote.png)
]]
vim.schedule(function()
local buf = vim.api.nvim_create_buf(false, true)
vim.api.nvim_buf_set_lines(buf, 0, -1, true, vim.split(content, '\n'))
vim.api.nvim_buf_set_option(buf, 'filetype', 'markdown')
vim.api.nvim_set_current_buf(buf)
vim.cmd('split')
end)
Steps to repro
- Save the above as
minimal.lua
-
nvim --clean -u minimal.lua
- See how the bottom statusline is hidden and flikers as the cursor moves
Env
OS: Linux 6.6.8-arch1-1 Term: alacritty 0.13.0 (78fa4d6f) + tmux 3.3a Ueberzug: 18.2.1