1

My vim always gets distorted after I switch between tabs in the terminal.

The correct displayenter image description here

The distorted display

enter image description here

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.

1 Answer 1

3

Do 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.

1
  • 1
    Ah yes I have a bigger font in my vim tab
    – Bobby
    May 1, 2017 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.