4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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.
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
22 off_t high_offset; /* offset of char after last line that could
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 */
32 if (state == TS_BINARY || state == TS_SKIP_BACK)
34 /* Adjust the search file offset to the correct position */
35 + search_info.curr_offset_used = search_info.curr_offset;
37 fseeko(fp, search_info.curr_offset, SEEK_SET);
42 /* Hit end of file. Skip backwards. */
44 search_info.match_offset = ftell(fp);
45 + search_info.curr_offset = search_info.curr_offset_used;
53 if (MB_STRNICMP(tagp.tagname, pathead, cmplen) != 0)
54 state = TS_STEP_FORWARD;
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;
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
67 { /* Add new patch number below this line */
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.
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 ///