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.1.241 < prev    next >
Encoding:
Internet Message Format  |  2002-10-26  |  2.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.241
  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.1.241
  11. Problem:    Something goes wrong when drawing or undrawing the cursor.
  12. Solution:   Remember when the cursor invalid in a better way.
  13. Files:        src/gui.c
  14.  
  15.  
  16. *** ../vim61.240/src/gui.c    Sun Oct 27 20:38:46 2002
  17. --- src/gui.c    Sun Oct 27 20:36:17 2002
  18. ***************
  19. *** 807,813 ****
  20.   #endif
  21.       gui.cursor_row = gui.row;
  22.       gui.cursor_col = gui.col;
  23. -     gui.cursor_is_valid = TRUE;
  24.   
  25.       /* Only write to the screen after ScreenLines[] has been initialized */
  26.       if (!screen_cleared || ScreenLines == NULL)
  27. --- 807,812 ----
  28. ***************
  29. *** 821,826 ****
  30. --- 820,827 ----
  31.       if (gui.row >= screen_Rows || gui.col >= screen_Columns)
  32.           return;
  33.   
  34. +     gui.cursor_is_valid = TRUE;
  35.       /*
  36.        * How the cursor is drawn depends on the current mode.
  37.        */
  38. ***************
  39. *** 927,935 ****
  40.       old_hl_mask = gui.highlight_mask;
  41.       if (shape_table[idx].shape == SHAPE_BLOCK
  42.   #ifdef FEAT_HANGULIN
  43. !         || composing_hangul
  44.   #endif
  45. !         )
  46.       {
  47.           /*
  48.            * Draw the text character with the cursor colors.    Use the
  49. --- 928,936 ----
  50.       old_hl_mask = gui.highlight_mask;
  51.       if (shape_table[idx].shape == SHAPE_BLOCK
  52.   #ifdef FEAT_HANGULIN
  53. !         || composing_hangul
  54.   #endif
  55. !        )
  56.       {
  57.           /*
  58.            * Draw the text character with the cursor colors.    Use the
  59. ***************
  60. *** 1723,1728 ****
  61. --- 1724,1731 ----
  62.    * actually draw (an inverted) cursor.
  63.    * GUI_MON_TRS_CURSOR is used to draw the cursor text with a transparant
  64.    * background.
  65. +  * GUI_MON_NOCLEAR is used to avoid clearing the selection when drawing over
  66. +  * it.
  67.    * Returns OK, unless "back" is non-zero and using the bold trick, then return
  68.    * FAIL (the caller should start drawing "back" chars back).
  69.    */
  70. ***************
  71. *** 2079,2084 ****
  72. --- 2082,2090 ----
  73.               gui.cursor_row, gui.cursor_col + 1, GUI_MON_NOCLEAR);
  74.       }
  75.   #endif
  76. +     /* Cursor_is_valid is reset when the cursor is undrawn, also reset it
  77. +      * here in case it wasn't needed to undraw it. */
  78. +     gui.cursor_is_valid = FALSE;
  79.       }
  80.   }
  81.   
  82. *** ../vim61.240/src/version.c    Sun Oct 27 20:49:12 2002
  83. --- src/version.c    Sun Oct 27 20:51:11 2002
  84. ***************
  85. *** 608,609 ****
  86. --- 608,611 ----
  87.   {   /* Add new patch number below this line */
  88. + /**/
  89. +     241,
  90.   /**/
  91.  
  92. -- 
  93. Vim is like Emacs without all the typing.  (John "Johann" Spetz)
  94.  
  95.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  96. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  97. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  98.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  99.