summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.068
blob: 508bac125443be88be6bfa60b5c53444bacd382a (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
To: vim-dev@vim.org
Subject: Patch 7.2.068
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.068
Problem:    Emacs tags file lines can be too long, resulting in an error
	    message. (James Vega)
Solution:   Ignore lines with errors if they are too long.
Files:	    src/tag.c


*** ../vim-7.2.067/src/tag.c	Fri Jul 18 11:26:12 2008
--- src/tag.c	Sat Dec  6 13:54:33 2008
***************
*** 2725,2731 ****
--- 2725,2748 ----
  	 */
  	p_7f = vim_strchr(lbuf, 0x7f);
  	if (p_7f == NULL)
+ 	{
+ etag_fail:
+ 	    if (vim_strchr(lbuf, '\n') == NULL)
+ 	    {
+ 		/* Truncated line.  Ignore it. */
+ 		if (p_verbose >= 5)
+ 		{
+ 		    verbose_enter();
+ 		    MSG(_("Ignoring long line in tags file"));
+ 		    verbose_leave();
+ 		}
+ 		tagp->command = lbuf;
+ 		tagp->tagname = lbuf;
+ 		tagp->tagname_end = lbuf;
+ 		return OK;
+ 	    }
  	    return FAIL;
+ 	}
  
  	/* Find ^A.  If not found the line number is after the 0x7f */
  	p = vim_strchr(p_7f, Ctrl_A);
***************
*** 2735,2741 ****
  	    ++p;
  
  	if (!VIM_ISDIGIT(*p))	    /* check for start of line number */
! 	    return FAIL;
  	tagp->command = p;
  
  
--- 2752,2758 ----
  	    ++p;
  
  	if (!VIM_ISDIGIT(*p))	    /* check for start of line number */
! 	    goto etag_fail;
  	tagp->command = p;
  
  
***************
*** 2749,2755 ****
  	    /* find end of tagname */
  	    for (p = p_7f - 1; !vim_iswordc(*p); --p)
  		if (p == lbuf)
! 		    return FAIL;
  	    tagp->tagname_end = p + 1;
  	    while (p >= lbuf && vim_iswordc(*p))
  		--p;
--- 2766,2772 ----
  	    /* find end of tagname */
  	    for (p = p_7f - 1; !vim_iswordc(*p); --p)
  		if (p == lbuf)
! 		    goto etag_fail;
  	    tagp->tagname_end = p + 1;
  	    while (p >= lbuf && vim_iswordc(*p))
  		--p;
*** ../vim-7.2.067/src/version.c	Tue Dec  9 11:17:23 2008
--- src/version.c	Tue Dec  9 12:05:41 2008
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     68,
  /**/

-- 
Q: What do you call a fish without an eye?
A: fsh!
Q: What do you call a deer with no eyes?
A: no eye deer.
Q: What do you call a deer with no eyes and no legs?
A: still no eye deer.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///