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.392 < prev    next >
Encoding:
Internet Message Format  |  2003-03-13  |  2.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.392
  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.392 (depends on 6.1.383)
  11. Problem:    Highlighting in the 'statusline' is in the wrong position when an
  12.         item is tructated. (Zak Beck)
  13. Solution:   Correct the start of 'statusline' items properly for a truncated
  14.         item.
  15. Files:        src/buffer.c
  16.  
  17.  
  18. *** ../vim61.391/src/buffer.c    Sun Mar  9 22:39:19 2003
  19. --- src/buffer.c    Wed Mar 12 19:47:23 2003
  20. ***************
  21. *** 3475,3481 ****
  22.           s = out;
  23.       else
  24.       {
  25. -         s = item[0].start;
  26.           for ( ; l < itemcnt; l++)
  27.           if (item[l].type == Trunc)
  28.           {
  29. --- 3475,3480 ----
  30. ***************
  31. *** 3483,3488 ****
  32. --- 3482,3493 ----
  33.               s = item[l].start;
  34.               break;
  35.           }
  36. +         if (l == itemcnt)
  37. +         {
  38. +         /* No %< item, truncate first item. */
  39. +         s = item[0].start;
  40. +         l = 0;
  41. +         }
  42.       }
  43.   
  44.       if (width - vim_strsize(s) > maxwidth)
  45. ***************
  46. *** 3541,3552 ****
  47.           *s = NUL;
  48.           }
  49.   
  50.           for (; l < itemcnt; l++)
  51.           {
  52. !         if (item[l].start - n >= out)
  53.               item[l].start -= n;
  54.           else
  55. !             item[l].start = out;
  56.           }
  57.       }
  58.       width = maxwidth;
  59. --- 3546,3558 ----
  60.           *s = NUL;
  61.           }
  62.   
  63. +         --n;    /* count the '<' */
  64.           for (; l < itemcnt; l++)
  65.           {
  66. !         if (item[l].start - n >= s)
  67.               item[l].start -= n;
  68.           else
  69. !             item[l].start = s;
  70.           }
  71.       }
  72.       width = maxwidth;
  73. *** ../vim61.391/src/version.c    Fri Mar 14 22:45:22 2003
  74. --- src/version.c    Fri Mar 14 22:52:28 2003
  75. ***************
  76. *** 613,614 ****
  77. --- 613,616 ----
  78.   {   /* Add new patch number below this line */
  79. + /**/
  80. +     392,
  81.   /**/
  82.  
  83. -- 
  84. hundred-and-one symptoms of being an internet addict:
  85. 79. All of your most erotic dreams have a scrollbar at the right side.
  86.  
  87.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  88. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  89. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  90.  \\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
  91.