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 / 7.0 / 7.0.122 < prev    next >
Encoding:
Internet Message Format  |  2006-10-08  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.0.122
  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 7.0.122
  11. Problem:    GUI: When clearing after a bold, double-wide character half a
  12.         character may be drawn.
  13. Solution:   Check for double-wide character and redraw it. (Yukihiro Nakadaira)
  14. Files:        src/screen.c
  15.  
  16.  
  17. *** ../vim-7.0.121/src/screen.c    Thu Sep 14 21:04:09 2006
  18. --- src/screen.c    Sat Oct  7 15:13:43 2006
  19. ***************
  20. *** 5079,5093 ****
  21.            * character too.  If we didn't skip any blanks above, then we
  22.            * only redraw if the character wasn't already redrawn anyway.
  23.            */
  24. !         if (gui.in_use && (col > startCol || !redraw_this)
  25. ! # ifdef FEAT_MBYTE
  26. !             && enc_dbcs == 0
  27. ! # endif
  28. !            )
  29.           {
  30.           hl = ScreenAttrs[off_to];
  31.           if (hl > HL_ALL || (hl & HL_BOLD))
  32. !             screen_char(off_to - 1, row, col + coloff - 1);
  33.           }
  34.   #endif
  35.           screen_fill(row, row + 1, col + coloff, clear_width + coloff,
  36. --- 5079,5116 ----
  37.            * character too.  If we didn't skip any blanks above, then we
  38.            * only redraw if the character wasn't already redrawn anyway.
  39.            */
  40. !         if (gui.in_use && (col > startCol || !redraw_this))
  41.           {
  42.           hl = ScreenAttrs[off_to];
  43.           if (hl > HL_ALL || (hl & HL_BOLD))
  44. !         {
  45. !             int prev_cells = 1;
  46. ! # ifdef FEAT_MBYTE
  47. !             if (enc_utf8)
  48. !             /* for utf-8, ScreenLines[char_offset + 1] == 0 means
  49. !              * that its width is 2. */
  50. !             prev_cells = ScreenLines[off_to - 1] == 0 ? 2 : 1;
  51. !             else if (enc_dbcs != 0)
  52. !             {
  53. !             /* find previous character by counting from first
  54. !              * column and get its width. */
  55. !             unsigned off = LineOffset[row];
  56. !             while (off < off_to)
  57. !             {
  58. !                 prev_cells = (*mb_off2cells)(off);
  59. !                 off += prev_cells;
  60. !             }
  61. !             }
  62. !             if (enc_dbcs != 0 && prev_cells > 1)
  63. !             screen_char_2(off_to - prev_cells, row,
  64. !                            col + coloff - prev_cells);
  65. !             else
  66. ! # endif
  67. !             screen_char(off_to - prev_cells, row,
  68. !                            col + coloff - prev_cells);
  69. !         }
  70.           }
  71.   #endif
  72.           screen_fill(row, row + 1, col + coloff, clear_width + coloff,
  73. *** ../vim-7.0.121/src/version.c    Sun Oct  8 13:56:53 2006
  74. --- src/version.c    Mon Oct  9 22:10:17 2006
  75. ***************
  76. *** 668,669 ****
  77. --- 668,671 ----
  78.   {   /* Add new patch number below this line */
  79. + /**/
  80. +     122,
  81.   /**/
  82.  
  83. -- 
  84. How To Keep A Healthy Level Of Insanity:
  85. 7. Finish all your sentences with "in accordance with the prophecy".
  86.  
  87.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  88. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  89. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  90.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  91.