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.3 / 6.3.005 < prev    next >
Encoding:
Internet Message Format  |  2004-06-15  |  2.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.3.005
  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.3.005
  11. Problem:    Crash when searching for a pattern with a character offset and
  12.         starting in a closed fold. (Frank Butler)
  13. Solution:   Check for the column to be past the end of the line.  Also fix
  14.         that a pattern with a character offset relative to the end isn't
  15.         read back from the viminfo properly.
  16. Files:        src/search.c
  17.  
  18.  
  19. *** ../vim-6.3.004/src/search.c    Sun Jun 13 12:33:41 2004
  20. --- src/search.c    Wed Jun 16 10:46:17 2004
  21. ***************
  22. *** 1138,1147 ****
  23.       /*
  24.        * If there is a character offset, subtract it from the current
  25.        * position, so we don't get stuck at "?pat?e+2" or "/pat/s-2".
  26.        * This is not done for a line offset, because then we would not be vi
  27.        * compatible.
  28.        */
  29. !     if (!spats[0].off.line && spats[0].off.off)
  30.       {
  31.           if (spats[0].off.off > 0)
  32.           {
  33. --- 1138,1148 ----
  34.       /*
  35.        * If there is a character offset, subtract it from the current
  36.        * position, so we don't get stuck at "?pat?e+2" or "/pat/s-2".
  37. +      * Skip this if pos.col is near MAXCOL (closed fold).
  38.        * This is not done for a line offset, because then we would not be vi
  39.        * compatible.
  40.        */
  41. !     if (!spats[0].off.line && spats[0].off.off && pos.col < MAXCOL - 2)
  42.       {
  43.           if (spats[0].off.off > 0)
  44.           {
  45. ***************
  46. *** 1209,1215 ****
  47.   
  48.           retval = 2;        /* pattern found, line offset added */
  49.           }
  50. !         else
  51.           {
  52.           /* to the right, check for end of file */
  53.           if (spats[0].off.off > 0)
  54. --- 1210,1216 ----
  55.   
  56.           retval = 2;        /* pattern found, line offset added */
  57.           }
  58. !         else if (pos.col < MAXCOL - 2)    /* just in case */
  59.           {
  60.           /* to the right, check for end of file */
  61.           if (spats[0].off.off > 0)
  62. ***************
  63. *** 4404,4410 ****
  64.       if (lp[3] == 'L')
  65.           off_line = TRUE;
  66.       if (lp[4] == 'E')
  67. !         off_end = TRUE;
  68.       lp += 5;
  69.       off = getdigits(&lp);
  70.       }
  71. --- 4405,4411 ----
  72.       if (lp[3] == 'L')
  73.           off_line = TRUE;
  74.       if (lp[4] == 'E')
  75. !         off_end = SEARCH_END;
  76.       lp += 5;
  77.       off = getdigits(&lp);
  78.       }
  79. *** ../vim-6.3.004/src/version.c    Sun Jun 13 12:33:41 2004
  80. --- src/version.c    Wed Jun 16 10:51:48 2004
  81. ***************
  82. *** 643,644 ****
  83. --- 643,646 ----
  84.   {   /* Add new patch number below this line */
  85. + /**/
  86. +     5,
  87.   /**/
  88.  
  89. -- 
  90. In a world without fences, who needs Gates and Windows?
  91.  
  92.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  93. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  94. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  95.  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
  96.