]>
Commit | Line | Data |
---|---|---|
65bfde4c AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.068 | |
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.2.068 | |
11 | Problem: Emacs tags file lines can be too long, resulting in an error | |
12 | message. (James Vega) | |
13 | Solution: Ignore lines with errors if they are too long. | |
14 | Files: src/tag.c | |
15 | ||
16 | ||
17 | *** ../vim-7.2.067/src/tag.c Fri Jul 18 11:26:12 2008 | |
18 | --- src/tag.c Sat Dec 6 13:54:33 2008 | |
19 | *************** | |
20 | *** 2725,2731 **** | |
21 | --- 2725,2748 ---- | |
22 | */ | |
23 | p_7f = vim_strchr(lbuf, 0x7f); | |
24 | if (p_7f == NULL) | |
25 | + { | |
26 | + etag_fail: | |
27 | + if (vim_strchr(lbuf, '\n') == NULL) | |
28 | + { | |
29 | + /* Truncated line. Ignore it. */ | |
30 | + if (p_verbose >= 5) | |
31 | + { | |
32 | + verbose_enter(); | |
33 | + MSG(_("Ignoring long line in tags file")); | |
34 | + verbose_leave(); | |
35 | + } | |
36 | + tagp->command = lbuf; | |
37 | + tagp->tagname = lbuf; | |
38 | + tagp->tagname_end = lbuf; | |
39 | + return OK; | |
40 | + } | |
41 | return FAIL; | |
42 | + } | |
43 | ||
44 | /* Find ^A. If not found the line number is after the 0x7f */ | |
45 | p = vim_strchr(p_7f, Ctrl_A); | |
46 | *************** | |
47 | *** 2735,2741 **** | |
48 | ++p; | |
49 | ||
50 | if (!VIM_ISDIGIT(*p)) /* check for start of line number */ | |
51 | ! return FAIL; | |
52 | tagp->command = p; | |
53 | ||
54 | ||
55 | --- 2752,2758 ---- | |
56 | ++p; | |
57 | ||
58 | if (!VIM_ISDIGIT(*p)) /* check for start of line number */ | |
59 | ! goto etag_fail; | |
60 | tagp->command = p; | |
61 | ||
62 | ||
63 | *************** | |
64 | *** 2749,2755 **** | |
65 | /* find end of tagname */ | |
66 | for (p = p_7f - 1; !vim_iswordc(*p); --p) | |
67 | if (p == lbuf) | |
68 | ! return FAIL; | |
69 | tagp->tagname_end = p + 1; | |
70 | while (p >= lbuf && vim_iswordc(*p)) | |
71 | --p; | |
72 | --- 2766,2772 ---- | |
73 | /* find end of tagname */ | |
74 | for (p = p_7f - 1; !vim_iswordc(*p); --p) | |
75 | if (p == lbuf) | |
76 | ! goto etag_fail; | |
77 | tagp->tagname_end = p + 1; | |
78 | while (p >= lbuf && vim_iswordc(*p)) | |
79 | --p; | |
80 | *** ../vim-7.2.067/src/version.c Tue Dec 9 11:17:23 2008 | |
81 | --- src/version.c Tue Dec 9 12:05:41 2008 | |
82 | *************** | |
83 | *** 678,679 **** | |
84 | --- 678,681 ---- | |
85 | { /* Add new patch number below this line */ | |
86 | + /**/ | |
87 | + 68, | |
88 | /**/ | |
89 | ||
90 | -- | |
91 | Q: What do you call a fish without an eye? | |
92 | A: fsh! | |
93 | Q: What do you call a deer with no eyes? | |
94 | A: no eye deer. | |
95 | Q: What do you call a deer with no eyes and no legs? | |
96 | A: still no eye deer. | |
97 | ||
98 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
99 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
100 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
101 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |