mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.869
Problem: MS-Windows: scrolling may cause text to disappear when using an Intel GPU. Solution: Call GetPixel(). (Yohei Endo)
This commit is contained in:
@@ -2996,6 +2996,20 @@ get_scroll_flags(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
* Delete the given number of lines from the given row, scrolling up any
|
||||||
* text further down within the scroll region.
|
* text further down within the scroll region.
|
||||||
@@ -3007,6 +3021,8 @@ gui_mch_delete_lines(
|
|||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
|
intel_gpu_workaround();
|
||||||
|
|
||||||
rc.left = FILL_X(gui.scroll_region_left);
|
rc.left = FILL_X(gui.scroll_region_left);
|
||||||
rc.right = FILL_X(gui.scroll_region_right + 1);
|
rc.right = FILL_X(gui.scroll_region_right + 1);
|
||||||
rc.top = FILL_Y(row);
|
rc.top = FILL_Y(row);
|
||||||
@@ -3038,6 +3054,8 @@ gui_mch_insert_lines(
|
|||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
|
intel_gpu_workaround();
|
||||||
|
|
||||||
rc.left = FILL_X(gui.scroll_region_left);
|
rc.left = FILL_X(gui.scroll_region_left);
|
||||||
rc.right = FILL_X(gui.scroll_region_right + 1);
|
rc.right = FILL_X(gui.scroll_region_right + 1);
|
||||||
rc.top = FILL_Y(row);
|
rc.top = FILL_Y(row);
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
869,
|
||||||
/**/
|
/**/
|
||||||
868,
|
868,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user