2 Subject: Patch 6.2.134 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Win32: When scrolling parts of the window are redrawn when this
13 Solution: Only invalidate parts of the window when they are obscured by
14 other windows. (Michael Wookey)
19 *** ../vim-6.2.133/src/gui_w48.c Sun Oct 26 20:11:34 2003
20 --- src/gui_w48.c Sun Oct 26 20:56:48 2003
27 + * Return flags used for scrolling.
28 + * The SW_INVALIDATE is required when part of the window is covered or
29 + * off-screen. Refer to MS KB Q75236.
32 + get_scroll_flags(void)
35 + RECT rcVim, rcOther, rcDest;
37 + GetWindowRect(s_hwnd, &rcVim);
38 + for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; )
39 + if (IsWindowVisible(hwnd))
41 + GetWindowRect(hwnd, &rcOther);
42 + if (IntersectRect(&rcDest, &rcVim, &rcOther))
43 + return SW_INVALIDATE;
49 * Delete the given number of lines from the given row, scrolling up any
50 * text further down within the scroll region.
54 rc.right = FILL_X(gui.scroll_region_right + 1);
56 rc.bottom = FILL_Y(gui.scroll_region_bot + 1);
57 ! /* The SW_INVALIDATE is required when part of the window is covered or
58 ! * off-screen. How do we avoid it when it's not needed? */
59 ScrollWindowEx(s_textArea, 0, -num_lines * gui.char_height,
60 ! &rc, &rc, NULL, NULL, SW_INVALIDATE);
62 UpdateWindow(s_textArea);
63 /* This seems to be required to avoid the cursor disappearing when
65 rc.right = FILL_X(gui.scroll_region_right + 1);
67 rc.bottom = FILL_Y(gui.scroll_region_bot + 1);
69 ScrollWindowEx(s_textArea, 0, -num_lines * gui.char_height,
70 ! &rc, &rc, NULL, NULL, get_scroll_flags());
72 UpdateWindow(s_textArea);
73 /* This seems to be required to avoid the cursor disappearing when
76 /* The SW_INVALIDATE is required when part of the window is covered or
77 * off-screen. How do we avoid it when it's not needed? */
78 ScrollWindowEx(s_textArea, 0, num_lines * gui.char_height,
79 ! &rc, &rc, NULL, NULL, SW_INVALIDATE);
81 gui_undraw_cursor(); /* Is this really necessary? */
82 UpdateWindow(s_textArea);
84 /* The SW_INVALIDATE is required when part of the window is covered or
85 * off-screen. How do we avoid it when it's not needed? */
86 ScrollWindowEx(s_textArea, 0, num_lines * gui.char_height,
87 ! &rc, &rc, NULL, NULL, get_scroll_flags());
89 gui_undraw_cursor(); /* Is this really necessary? */
90 UpdateWindow(s_textArea);
91 *** ../vim-6.2.133/src/version.c Sun Oct 26 20:19:23 2003
92 --- src/version.c Sun Oct 26 20:59:01 2003
96 { /* Add new patch number below this line */
102 ARTHUR: You fight with the strength of many men, Sir knight.
103 I am Arthur, King of the Britons. [pause]
104 I seek the finest and the bravest knights in the land to join me
105 in my Court of Camelot. [pause]
106 You have proved yourself worthy; will you join me? [pause]
107 You make me sad. So be it. Come, Patsy.
108 BLACK KNIGHT: None shall pass.
109 The Quest for the Holy Grail (Monty Python)
111 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
112 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
113 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
114 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///