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.106 < prev    next >
Encoding:
Internet Message Format  |  2003-09-26  |  2.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.106
  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.106
  11. Problem:    Tag searching gets stuck on a very long line in the tags file.
  12. Solution:   When skipping back to search the first matching tag remember the
  13.         offset where searching started looking for a line break.
  14. Files:        src/tag.c
  15.  
  16.  
  17. *** ../vim-6.2.105/src/tag.c    Tue Aug 12 19:58:43 2003
  18. --- src/tag.c    Sat Sep 27 20:11:51 2003
  19. ***************
  20. *** 1022,1027 ****
  21. --- 1022,1028 ----
  22.       off_t    high_offset;    /* offset of char after last line that could
  23.                      match */
  24.       off_t    curr_offset;    /* Current file offset in search range */
  25. +     off_t    curr_offset_used; /* curr_offset used when skipping back */
  26.       off_t    match_offset;    /* Where the binary search found a tag */
  27.       int    low_char;    /* first char at low_offset */
  28.       int    high_char;    /* first char at high_offset */
  29. ***************
  30. *** 1271,1276 ****
  31. --- 1272,1278 ----
  32.           if (state == TS_BINARY || state == TS_SKIP_BACK)
  33.           {
  34.           /* Adjust the search file offset to the correct position */
  35. +         search_info.curr_offset_used = search_info.curr_offset;
  36.   #ifdef HAVE_FSEEKO
  37.           fseeko(fp, search_info.curr_offset, SEEK_SET);
  38.   #else
  39. ***************
  40. *** 1303,1308 ****
  41. --- 1305,1311 ----
  42.               /* Hit end of file.  Skip backwards. */
  43.               state = TS_SKIP_BACK;
  44.               search_info.match_offset = ftell(fp);
  45. +             search_info.curr_offset = search_info.curr_offset_used;
  46.               continue;
  47.           }
  48.           }
  49. ***************
  50. *** 1628,1633 ****
  51. --- 1631,1640 ----
  52.           {
  53.               if (MB_STRNICMP(tagp.tagname, pathead, cmplen) != 0)
  54.               state = TS_STEP_FORWARD;
  55. +             else
  56. +             /* Have to skip back more.  Restore the curr_offset
  57. +              * used, otherwise we get stuck at a long line. */
  58. +             search_info.curr_offset = search_info.curr_offset_used;
  59.               continue;
  60.           }
  61.           else if (state == TS_STEP_FORWARD)
  62. *** ../vim-6.2.105/src/version.c    Sat Sep 27 19:48:50 2003
  63. --- src/version.c    Sat Sep 27 20:17:22 2003
  64. ***************
  65. *** 632,633 ****
  66. --- 638,641 ----
  67.   {   /* Add new patch number below this line */
  68. + /**/
  69. +     106,
  70.   /**/
  71.  
  72. -- 
  73. hundred-and-one symptoms of being an internet addict:
  74. 38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
  75.     on the way back to bed.
  76.  
  77.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  78. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  79. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  80.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  81.