My vim always gets distorted after I switch between tabs in the terminal.
The distorted display
This always happen when I switch back to the vim tab and gets back to normal after I press a move like j or k.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityDo you, by any chance, have different font size in your other tabs?
When switching between tabs of different font size in a maximized/fullscreen gnome-terminal
(or mate-terminal
), weird sizing issues occur. The terminal emulator wants to resize itself (to keep the same number of character cells as you can see with unmaximized windows; keeping the same number of pixels couldn't work together with grid-aligned resizes), but on the other hand, the window manager pushes back and reverts the terminal emulator's resize attempt. This generates two consecutive back-n-forth resize events towards the client application. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=731137.
In the mean time, we've seen multiple such bugreports in terminal emulators where it eventually turned out that vim
fails to correctly handle resize events that arrive in short succession. This should be brought into vim
developers' attention and fixed by them.