]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.538 v7.3.538
authorBram Moolenaar <Bram@vim.org>
Fri, 1 Jun 2012 16:34:41 +0000 (18:34 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 1 Jun 2012 16:34:41 +0000 (18:34 +0200)
Problem:    'efm' does not handle Tabs in pointer lines.
Solution:   Add Tab support. Improve tests. (Lech Lorens)

src/quickfix.c
src/testdir/test10.in
src/testdir/test10.ok
src/version.c

index c6e409c169398e1f2688f8fda04a1133e653f0e2..bbcebe4e2949c068fd47496d0b95b782d641d2ea 100644 (file)
@@ -247,7 +247,7 @@ qf_init_ext(qi, efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast,
                        {'t', "."},
                        {'m', ".\\+"},
                        {'r', ".*"},
-                       {'p', "[- .]*"},
+                       {'p', "[-       .]*"},
                        {'v', "\\d\\+"},
                        {'s', ".\\+"}
                    };
@@ -677,11 +677,23 @@ restofline:
                }
                if ((i = (int)fmt_ptr->addr[7]) > 0)            /* %p */
                {
+                   char_u      *match_ptr;
+
                    if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
                        continue;
-                   col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
-                   if (*((char_u *)regmatch.startp[i]) != TAB)
-                       use_viscol = TRUE;
+                   col = 0;
+                   for (match_ptr = regmatch.startp[i];
+                                  match_ptr != regmatch.endp[i]; ++match_ptr)
+                   {
+                       ++col;
+                       if (*match_ptr == TAB)
+                       {
+                           col += 7;
+                           col -= col % 8;
+                       }
+                   }
+                   ++col;
+                   use_viscol = TRUE;
                }
                if ((i = (int)fmt_ptr->addr[8]) > 0)            /* %v */
                {
index 50ef86eb0c39f18918046c460ef0bccb2acda906..2d0d54660662630c1a986a05574a2ac2e7d65e12 100644 (file)
@@ -8,41 +8,81 @@ STARTTEST
 :7/start of errorfile/,/end of errorfile/w! Xerrorfile1
 :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
 :/start of testfile/,/end of testfile/w! Xtestfile
+:set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
+:set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
 :cf Xerrorfile2
 :clast
 :copen
 :let a=w:quickfix_title
 :wincmd p
-gR\12=a\r\e
+lgR\12=a\r\e
 :cf Xerrorfile1
-rA
+grA
 :cn
-rB
+gRLINE 6, COL 19\e
 :cn
-rC
+gRNO COLUMN SPECIFIED\e
 :cn
-rD
+gRAGAIN NO COLUMN\e
 :cn
-rE
+gRCOL 1\e
 :cn
+gRCOL 2\e
+:cn
+gRCOL 10\e
+:cn
+gRVCOL 10\e
+:cn
+grI
+:cn
+gR. SPACE POINTER\e
+:cn
+gR. DOT POINTER\e
+:cn
+gR. DASH POINTER\e
+:cn
+gR. TAB-SPACE POINTER\e
+:clast
+:cprev
+:cprev
 :wincmd w
 :let a=w:quickfix_title
 :wincmd p
-gR\12=a\r\e
+lgR\12=a\r\e
 :w! test.out             " Write contents of this file
 :qa!
 ENDTEST
 
 start of errorfile
 "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
-"Xtestfile", line 7 col 19; this is an error
+"Xtestfile", line 6 col 19; this is an error
 gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c
-Xtestfile:13: parse error before `asd'
+Xtestfile:9: parse error before `asd'
 make: *** [vim] Error 1
-in file "Xtestfile" linenr 16: there is an error
+in file "Xtestfile" linenr 10: there is an error
 
 2 returned
-"Xtestfile", linenr 19: yet another problem
+"Xtestfile", line 11 col 1; this is an error
+"Xtestfile", line 12 col 2; this is another error
+"Xtestfile", line 14:10; this is an error in column 10
+=Xtestfile=, line 15:10; this is another error, but in vcol 10 this time
+"Xtestfile", linenr 16: yet another problem
+Error in "Xtestfile" at line 17:
+x should be a dot
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17
+            ^
+Error in "Xtestfile" at line 18:
+x should be a dot
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18
+.............^
+Error in "Xtestfile" at line 19:
+x should be a dot
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19
+--------------^
+Error in "Xtestfile" at line 20:
+x should be a dot
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20
+              ^
 
 Does anyone know what is the problem and how to correction it?
 "Xtestfile", line 21 col 9: What is the title of the quickfix window?
@@ -50,25 +90,25 @@ Does anyone know what is the problem and how to correction it?
 end of errorfile
 
 start of testfile
-line 2  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 4  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  4
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  6
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  9
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 10
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 12
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 14
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 15
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 21
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 22
 end of testfile
index 01d47e8f35ac0a78b2c12dca01064e7719a26ad8..76a02f40b48d3c8fe591560b311654f1b2a59aff 100644 (file)
@@ -1,23 +1,23 @@
 start of testfile
-line 2  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 4  xxxAxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 7  xxxxxxxxxxBxxxxxxxxxxxxxxxxxxx
-line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Cine 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Dine 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx
-line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3
+       xxxxxxxxxxAxxxxxxxxxxxxxxxxxxx    line  4
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5
+       xxxxxxxxxxxxxxxxxLINE 6, COL 19   line  6
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8
+       NO COLUMN SPECIFIEDxxxxxxxxxxx    line  9
+       AGAIN NO COLUMNxxxxxxxxxxxxxxx    line 10
+COL 1  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11
+       COL 2xxxxxxxxxxxxxxxxxxxxxxxxx    line 12
+       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13
+       xxxxxxxxCOL 10xxxxxxxxxxxxxxxx    line 14
+       xVCOL 10xxxxxxxxxxxxxxxxxxxxxx    line 15
+       Ixxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16
+       xxxx. SPACE POINTERxxxxxxxxxxx    line 17
+       xxxxx. DOT POINTERxxxxxxxxxxxx    line 18
+       xxxxxx. DASH POINTERxxxxxxxxxx    line 19
+       xxxxxxx. TAB-SPACE POINTERxxxx    line 20
+       xxxxxxxx:cf Xerrorfile1xxxxxxx    line 21
+       xxxxxxxx:cf Xerrorfile2xxxxxxx    line 22
 end of testfile
index 0794bed8da4d4bff41b1e6018c515c84eb1023c3..4f3ef5bfa02c02243598245db9f92fa2feb4c6f8 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    538,
 /**/
     537,
 /**/