home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.134 < prev    next >
Encoding:
Internet Message Format  |  2003-10-25  |  3.9 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.134 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.134 (extra)
  11. Problem:    Win32: When scrolling parts of the window are redrawn when this
  12.         isn't necessary.
  13. Solution:   Only invalidate parts of the window when they are obscured by
  14.         other windows. (Michael Wookey)
  15. Files:        src/gui_w48.c
  16.  
  17.  
  18.  
  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
  21. ***************
  22. *** 2382,2387 ****
  23. --- 2382,2409 ----
  24.   }
  25.   
  26.   /*
  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.
  30. +  */
  31. +     static int
  32. + get_scroll_flags(void)
  33. + {
  34. +     HWND    hwnd;
  35. +     RECT    rcVim, rcOther, rcDest;
  36. +     GetWindowRect(s_hwnd, &rcVim);
  37. +     for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; )
  38. +     if (IsWindowVisible(hwnd))
  39. +     {
  40. +         GetWindowRect(hwnd, &rcOther);
  41. +         if (IntersectRect(&rcDest, &rcVim, &rcOther))
  42. +         return SW_INVALIDATE;
  43. +     }
  44. +     return 0;
  45. + }
  46. + /*
  47.    * Delete the given number of lines from the given row, scrolling up any
  48.    * text further down within the scroll region.
  49.    */
  50. ***************
  51. *** 2396,2405 ****
  52.       rc.right = FILL_X(gui.scroll_region_right + 1);
  53.       rc.top = FILL_Y(row);
  54.       rc.bottom = FILL_Y(gui.scroll_region_bot + 1);
  55. !     /* The SW_INVALIDATE is required when part of the window is covered or
  56. !      * off-screen.  How do we avoid it when it's not needed? */
  57.       ScrollWindowEx(s_textArea, 0, -num_lines * gui.char_height,
  58. !         &rc, &rc, NULL, NULL, SW_INVALIDATE);
  59.   
  60.       UpdateWindow(s_textArea);
  61.       /* This seems to be required to avoid the cursor disappearing when
  62. --- 2418,2426 ----
  63.       rc.right = FILL_X(gui.scroll_region_right + 1);
  64.       rc.top = FILL_Y(row);
  65.       rc.bottom = FILL_Y(gui.scroll_region_bot + 1);
  66.       ScrollWindowEx(s_textArea, 0, -num_lines * gui.char_height,
  67. !                     &rc, &rc, NULL, NULL, get_scroll_flags());
  68.   
  69.       UpdateWindow(s_textArea);
  70.       /* This seems to be required to avoid the cursor disappearing when
  71. ***************
  72. *** 2431,2437 ****
  73.       /* The SW_INVALIDATE is required when part of the window is covered or
  74.        * off-screen.  How do we avoid it when it's not needed? */
  75.       ScrollWindowEx(s_textArea, 0, num_lines * gui.char_height,
  76. !         &rc, &rc, NULL, NULL, SW_INVALIDATE);
  77.   
  78.       gui_undraw_cursor();    /* Is this really necessary? */
  79.       UpdateWindow(s_textArea);
  80. --- 2452,2458 ----
  81.       /* The SW_INVALIDATE is required when part of the window is covered or
  82.        * off-screen.  How do we avoid it when it's not needed? */
  83.       ScrollWindowEx(s_textArea, 0, num_lines * gui.char_height,
  84. !                     &rc, &rc, NULL, NULL, get_scroll_flags());
  85.   
  86.       gui_undraw_cursor();    /* Is this really necessary? */
  87.       UpdateWindow(s_textArea);
  88. *** ../vim-6.2.133/src/version.c    Sun Oct 26 20:19:23 2003
  89. --- src/version.c    Sun Oct 26 20:59:01 2003
  90. ***************
  91. *** 639,640 ****
  92. --- 639,642 ----
  93.   {   /* Add new patch number below this line */
  94. + /**/
  95. +     134,
  96.   /**/
  97.  
  98. -- 
  99. ARTHUR:  You fight with the strength of many men, Sir knight.
  100.          I am Arthur, King of the Britons.  [pause]
  101.          I seek the finest and the bravest knights in the land to join me
  102.          in my Court of Camelot.  [pause]
  103.          You have proved yourself worthy; will you join me?  [pause]
  104.          You make me sad.  So be it.  Come, Patsy.
  105. BLACK KNIGHT:  None shall pass.
  106.                                   The Quest for the Holy Grail (Monty Python)
  107.  
  108.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  109. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  110. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  111.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  112.