summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-09-15 17:58:29 +0200
committerBram Moolenaar <Bram@vim.org>2015-09-15 17:58:29 +0200
commit3b59755862f4604ded8155404a1fe4c84c606829 (patch)
tree8bc7ae5bbed29ac2f18a43554764fae092e8ecd3 /src
parent54f018cd5994c3ffcd0740526e56db6934edf1f2 (diff)
downloadvim-git-3b59755862f4604ded8155404a1fe4c84c606829.tar.gz
patch 7.4.869v7.4.869
Problem: MS-Windows: scrolling may cause text to disappear when using an Intel GPU. Solution: Call GetPixel(). (Yohei Endo)
Diffstat (limited to 'src')
-rw-r--r--src/gui_w48.c28
-rw-r--r--src/version.c2
2 files changed, 25 insertions, 5 deletions
diff --git a/src/gui_w48.c b/src/gui_w48.c
index b40a6b9e0..bff67a813 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -2389,7 +2389,7 @@ show_tabline_popup_menu(void)
return;
if (first_tabpage->tp_next != NULL)
- add_tabline_popup_menu_entry(tab_pmenu,
+ add_tabline_popup_menu_entry(tab_pmenu,
TABLINE_MENU_CLOSE, _("Close tab"));
add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_NEW, _("New tab"));
add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_OPEN,
@@ -2931,10 +2931,10 @@ gui_mswin_get_valid_dimensions(
base_width = gui_get_base_width()
+ (GetSystemMetrics(SM_CXFRAME) +
- GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
base_height = gui_get_base_height()
+ (GetSystemMetrics(SM_CYFRAME) +
- GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
+ gui_mswin_get_menu_height(FALSE)
@@ -2997,6 +2997,20 @@ get_scroll_flags(void)
}
/*
+ * On some Intel GPUs, the regions drawn just prior to ScrollWindowEx()
+ * may not be scrolled out properly.
+ * For gVim, when _OnScroll() is repeated, the character at the
+ * previous cursor position may be left drawn after scroll.
+ * The problem can be avoided by calling GetPixel() to get a pixel in
+ * the region before ScrollWindowEx().
+ */
+ static void
+intel_gpu_workaround(void)
+{
+ GetPixel(s_hdc, FILL_X(gui.col), FILL_Y(gui.row));
+}
+
+/*
* Delete the given number of lines from the given row, scrolling up any
* text further down within the scroll region.
*/
@@ -3007,6 +3021,8 @@ gui_mch_delete_lines(
{
RECT rc;
+ intel_gpu_workaround();
+
rc.left = FILL_X(gui.scroll_region_left);
rc.right = FILL_X(gui.scroll_region_right + 1);
rc.top = FILL_Y(row);
@@ -3038,6 +3054,8 @@ gui_mch_insert_lines(
{
RECT rc;
+ intel_gpu_workaround();
+
rc.left = FILL_X(gui.scroll_region_left);
rc.right = FILL_X(gui.scroll_region_right + 1);
rc.top = FILL_Y(row);
@@ -3319,10 +3337,10 @@ gui_mch_newfont()
GetWindowRect(s_hwnd, &rect);
gui_resize_shell(rect.right - rect.left
- (GetSystemMetrics(SM_CXFRAME) +
- GetSystemMetrics(SM_CXPADDEDBORDER)) * 2,
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2,
rect.bottom - rect.top
- (GetSystemMetrics(SM_CYFRAME) +
- GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
+ GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
- GetSystemMetrics(SM_CYCAPTION)
#ifdef FEAT_MENU
- gui_mswin_get_menu_height(FALSE)
diff --git a/src/version.c b/src/version.c
index a3eabcf3f..bc1e5550c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 869,
+/**/
868,
/**/
867,