# HG changeset patch # User vimboss # Date 1116799419 0 # Node ID cd05cd5cea911f37fe2bdf848880c097fee02281 # Parent 453b78cb488172eebc93a3bc6db120f0da283998 updated for version 7.0075 diff --git a/src/gui_w48.c b/src/gui_w48.c --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -2512,6 +2512,14 @@ get_scroll_flags(void) RECT rcVim, rcOther, rcDest; GetWindowRect(s_hwnd, &rcVim); + + /* Check if the window is partly above or below the screen. We don't care + * about partly left or right of the screen, it is not relevant when + * scrolling up or down. */ + if (rcVim.top < 0 || rcVim.bottom > GetSystemMetrics(SM_CYFULLSCREEN)) + return SW_INVALIDATE; + + /* Check if there is an window (partly) on top of us. */ for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; ) if (IsWindowVisible(hwnd)) {