neovim
neovim copied to clipboard
nvim detects wrong background in tmux
Problem
nvim uses light background when the terminal has dark background. This only happens in tmux (version 3.4).
Steps to reproduce
-
nvim --clean
in a dark terminal - Notice that nvim uses light background
Expected behavior
nvim uses dark background.
Neovim version (nvim -v)
NVIM v0.10.0-dev-2503+gda2130934b
Vim (not Nvim) behaves the same?
no, vim does not automatically detects terminal background
Operating system/version
Linux 6.6.9-arch1-1
Terminal name/version
alacritty 0.13.1 (fe2a3c56)
$TERM environment variable
tmux-256color
Installation
AUR
Cannot reproduce
@zeertzjq Thanks for your response. I don't know how to reliably reproduce it on other machines but here's the screen recording on my end:
https://github.com/neovim/neovim/assets/76579810/ae1efa29-dd79-4002-a75f-29d3204eba18
I also noticed that
- This bug only happens when nvim is launched inside a tmux session
- This bug does not exist in version
NVIM v0.10.0-dev-2363+gb76a01055f
but exists inNVIM v0.10.0-dev-2503+gda2130934b
So I wonder if it is due to commit eef2aedff?
@Bekaboo It's possible that your tmux configuration can be helpful here (or full repro with it).
@przepompownia The problem persists but I cannot seem to reliably reproduce it, sometimes nvim detects the correct background but sometimes not. In addition, my tmux config is lengthy so I am not sure whether it will be helpful, but here is the link: https://github.com/Bekaboo/dot/blob/master/.config/tmux/tmux.conf
I will report here again once I have time to reduce my tmux config and find a way to reliably reproduce the bug.