Open dylan-chong opened 6 years ago
For me, it happens even if the window with NeoVim has only one pane (w/ no splits)
Did you try vanilla NeoVim.. no plugins etc?
I tried vanilla NeoVim, and it is the same result.
Here is some additional info and workaround that may help in figuring out the underlying cause.
I use Tilix on Gnome as my terminal applicaton. The default size of the terminal application is 24x80. But I tend to make it full screen/vertically maximized as soon as it launches. All the reports above are after I had maximised the size of the terminal application.
However, just now I launched tmux first, before resizing, and the problem did not occur. I resized the terminal application after that, and neovim was sized properly even after that.
I am not sure, but this leads me to suspect that there is some issue in the way tmux/tmux-resurrect is reporting the size of the terminal to the underlying application.
Is there some way we can tell tmux to tell all of its panes that their sizes have changed? If so , then we can do some hacky thing that tells all panes to resize after the restore has completed
Same problem with NVIM v0.2.2. Use :redraw
to manually have vim redraw correctly after being resurrected.
I am having the same issues. If I use vim or neovim, with or without splits - the whole split is not filled and renders incorrectly too. Overlapping lines and big spaces between lines. Im using ressurect with obsession.vim.
:redraw
has no effect.
This issue seems to have gone away in the last few months. Maybe this was fixed accidentally in nvim 0.3
ignore my previous comment. this problem just happened to me again
Also happens to me when restoring. Sometimes I can move the cursor up and down the vim window and it will kind of grow back to size. Using :redraw
does not fix it.
Looks like adding the following to .tmux.conf
has fixed it:
set-window-option -g aggressive-resize
Agressive-resize didn't worked for me with nvim resizing inside tmux :/
I have found the solution to my issue and it was neither an issue with neovim or tmux. The vim airline status bar plugin is what was causing me the issue - https://github.com/vim-airline/vim-airline
I removed the airline plugin and then tested tmux and neovim using several different terminals - uxterm, termite, alacritty and urxvt - and neovim rendered correctly in a window with multiple panes.
Thus, I figured on trying a different status bar plugin - https://github.com/itchyny/lightline.vim - this status bar works just fine too. So pretty sure it's just vim airline that is the issue.
@dylan-chong @deepakjois Looking at some of the screen shots here - it looks like you guys are using the vim airline plugin too. Try lightline plugin instead and see what your results are.
@Darren-Haynes Thanks so much for finding this out! I will have to try this at some point whenever i get the chance
I have tried commenting out the vim airline plug in and can still replicate the bug
Just a note for anyone trying to replicate the bug in the future, it seems to help to replicate the bug if you resize the terminal window while it is restoringYet
I have also gotten this bug, as far as I can tell, I'm on vanilla neovim (installed from Ubuntu repos, haven't tried to install any plugins.) This problem usually happens when I have two neovim sessions on two different windows.
I can confirm that @comicsads . The problem for me only occurs when having 2 or more tmux windows have vim active when closing the terminal. After restarting the terminal and the resurrect happens only the first tmux window with vim has the wrong sizing.
I am also having this problem. I feel like it could be solved if resurrect opened vim differently, since it works fine when re-opened manually.
i have the same problem with vim.
I have found the solution to my issue and it was neither an issue with neovim or tmux. The vim airline status bar plugin is what was causing me the issue - https://github.com/vim-airline/vim-airline
I removed the airline plugin and then tested tmux and neovim using several different terminals - uxterm, termite, alacritty and urxvt - and neovim rendered correctly in a window with multiple panes.
Thus, I figured on trying a different status bar plugin - https://github.com/itchyny/lightline.vim - this status bar works just fine too. So pretty sure it's just vim airline that is the issue.
@dylan-chong @deepakjois Looking at some of the screen shots here - it looks like you guys are using the vim airline plugin too. Try lightline plugin instead and see what your results are.
I have no luck after removing airline.
I can confirm that @comicsads . The problem for me only occurs when having 2 or more tmux windows have vim active when closing the terminal. After restarting the terminal and the resurrect happens only the first tmux window with vim has the wrong sizing.
After read this, I tried to open my nvim at second pane and the issue gone.
If i save, killed the tmux server, restart tmux, and restore the session, neovim will not fill up the entire split
If the vim is taking up the entire screen (not in a split when session is saved), then the bug above does not happen