Gvim 7.4 on a Linux guest inside VirtualBox has serious redraw issues: often when I scroll up/down, the shown text gets corrupted (e.g., empty or with some \"holes\"). And I hav
There are lot of redraw issues. The solution(s) below address a very specific redraw issue with Windows 7 host, Linux guest, and Ubuntu (or Compiz).
Solution 1
Tested with the latest Virtual Box 5.0.4 & Guest Additions, Ubuntu 14.04.3, 3D Acceleration enabled, standard install with full updates.
a) sudo apt-get install compizconfig-settings-manager
b) Run it from the dash (type "ccsm"). Pick "Utility" on the left. Pick "Workarounds" (NOT the checkbox, click the button to enter sub category). "Force complete redraw on initial damage" should be on by default (not sure if relevant, just in case). Now ENABLE Force full screen redraws (buffer swap) on repaint, which is unchecked by default. The effect is immediate, if a gvim window is open just rapidly click between tabs, or jump top/bottom of files to see the difference.
Solution 2 (for 13.04, 13.10, or below)
If using 13.04 or below (perhaps 13.10 as well), first try to switch to Virtual Box 5.0.4+ (5.0.4 was tested) and its Guest Additions, install CCSM and test the workaround as described above (I can confirm this worked on my old 13.04 VM).
If that doesn't work or using the latest Virtual Box / Guest Additions is not an option then try to downgrade Guest Additions to version 4.2.12 (not just 4.2.x, trust me, I've tried many versions) NOTE that 4.2.12 won't work in Ubuntu 14.04.3+, due to the newer X Server version.
Older post below (some background)
Tests I went through:
Finally, after hours and hours of rebooting VMs...
Further
According to Bram Moolenaar "patch 7.3.638 merely removed an unnecessary redraw, which likely uncovered an existing problem" (with the GTK library).
However it's worth mentioning that I have been using an Ubuntu 13.04 VM for a year with Google Chrome, Firefox, Open Office, MySQL Workbench, etc. and have never had any other redraw issues. So even if it is a GTK bug it is a problem that appears to be closely tied to how VIM refreshes the window contents.
https://github.com/vim/vim/issues/91
Could be a GTK issue, but if it happens only with Windows 7 hosts... then it appears to be a "sync" problem between the GTK redraw / repaint events and the Open GL layer of Compiz (my guess).
How to reproduce / test bug
Open long text files in multiple tabs (saving/loading a session saves time).
Then quickly switch between tabs with Ctrl-PgUp / PgDn, or quickly move from top to bottom of a file with Ctrl-Home, Ctrl-End. Within seconds you will see only a part of the window refresh.