Nvim render bugs when resize using tmux

900 views Asked by At

I'm having some really annoying issues with nvim, when I resize my terminal using nvim on tmux the statusline kind of duplicate itself, I am not sure if this is a buffer problem or something to do with my terminal (alacritty) but I was able to replicate in xterm and kitty

Here's a video of what is happening https://streamable.com/vmt02x

As you can see, when I resize that window, the status line goes one line up, and then, when I scroll in nvim the status line get stucked in that line

Here's my tmux configuration:

set -s escape-time 0

set -s default-terminal tmux-256color
set -g default-terminal "screen-256color"
set -as terminal-overrides ",*:Tc"

bind r source-file ~/.tmux.conf

unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

bind -n C-M-h select-pane -L
bind -n C-M-l select-pane -R
bind -n C-M-j select-pane -D
bind -n C-M-k select-pane -U

bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2

bind -n C-Pageup   previous-window
bind -n C-Pagedown next-window

# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind - split-window -c "#{pane_current_path}"
bind _ split-window -h -c "#{pane_current_path}"

OS Specs:

OS: Arch Linux x86_64
Host: 30B3S0V900 ThinkStation P4
Kernel: 5.11.15-arch1-2
Uptime: 6 days, 23 hours, 51 min
Packages: 587 (pacman)
Shell: zsh 5.8
Resolution: 1920x1080, 1920x1080
WM: bspwm
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: Alacritty
CPU: Intel Xeon E5-1630 v4 (8)
GPU: NVIDIA Quadro P400
Memory: 2044MiB / 15900MiB

Already tried to use tmux without any configuration, changing TERM variable to alacritty, use no TERM variable modification, using no plugin / configuration in my status line (as you can see in the video) but the problem persists

: UPDATE :

Temporal solution: Using the setting: set -g default-terminal "xterm-kitty" with kitty terminal resolves the problem, but I am having no luck with Alacritty

https://github.com/tmux/tmux/issues/2530

Found similar issue in Tmux github.

1

There are 1 answers

0
Simba On

Update: resolved. Not sure which upgrading of these software made the difference.

  • NVIM v0.6.0-dev+61-g6f48c018b
  • tmux 3.2a
  • alacritty 0.8.0 (a1b13e6)

I got some idea from your vimrc. It's a Alacritty only problem. Currently reverting set cmdheight=2 back to set cmdheight=1 may solve it.