0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.538

Problem:    'efm' does not handle Tabs in pointer lines.
Solution:   Add Tab support. Improve tests. (Lech Lorens)
This commit is contained in:
Bram Moolenaar
2012-06-01 18:34:41 +02:00
parent 24ee83b0a0
commit f13de07e49
4 changed files with 111 additions and 57 deletions

View File

@@ -247,7 +247,7 @@ qf_init_ext(qi, efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast,
{'t', "."}, {'t', "."},
{'m', ".\\+"}, {'m', ".\\+"},
{'r', ".*"}, {'r', ".*"},
{'p', "[- .]*"}, {'p', "[- .]*"},
{'v', "\\d\\+"}, {'v', "\\d\\+"},
{'s', ".\\+"} {'s', ".\\+"}
}; };
@@ -677,11 +677,23 @@ restofline:
} }
if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
{ {
char_u *match_ptr;
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
continue; continue;
col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1); col = 0;
if (*((char_u *)regmatch.startp[i]) != TAB) for (match_ptr = regmatch.startp[i];
use_viscol = TRUE; 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 */ if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
{ {

View File

@@ -8,41 +8,81 @@ STARTTEST
:7/start of errorfile/,/end of errorfile/w! Xerrorfile1 :7/start of errorfile/,/end of errorfile/w! Xerrorfile1
:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
:/start of testfile/,/end of testfile/w! Xtestfile :/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 :cf Xerrorfile2
:clast :clast
:copen :copen
:let a=w:quickfix_title :let a=w:quickfix_title
:wincmd p :wincmd p
gR=a lgR=a
 
:cf Xerrorfile1 :cf Xerrorfile1
grA grA
:cn :cn
gRLINE 6, COL 19 gRLINE 6, COL 19
:cn :cn
gRNO COLUMN SPECIFIED gRNO COLUMN SPECIFIED
:cn :cn
gRAGAIN NO COLUMN gRAGAIN NO COLUMN
:cn :cn
gRCOL 1 gRCOL 1
:cn
gRCOL 2
:cn
gRCOL 10
:cn
gRVCOL 10
:cn
grI
:cn
gR. SPACE POINTER
:cn
gR. DOT POINTER
:cn
gR. DASH POINTER
:cn
gR. TAB-SPACE POINTER
:clast
:cprev
:cprev :cprev
:wincmd w :wincmd w
:let a=w:quickfix_title :let a=w:quickfix_title
:wincmd p :wincmd p
lgR=a lgR=a
 
:w! test.out " Write contents of this file :w! test.out " Write contents of this file
:qa! :qa!
ENDTEST ENDTEST
start of errorfile start of errorfile
"Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. "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 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 make: *** [vim] Error 1
in file "Xtestfile" linenr 10: there is an error in file "Xtestfile" linenr 10: there is an error
2 returned
"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 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
^ ^
@@ -50,25 +90,25 @@ 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? "Xtestfile", line 21 col 9: What is the title of the quickfix window?
"Xtestfile", line 22 col 9: What is the title of the quickfix window? "Xtestfile", line 22 col 9: What is the title of the quickfix window?
end of errorfile end of errorfile
start of testfile start of testfile
line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3
line 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4
line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5
line 6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 6
line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7
line 8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8
line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 9
line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10
line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11
line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 12
line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13
line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 14
line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 15
line 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16
line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17
line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18
line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19
line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21

View File

@@ -1,23 +1,23 @@
start of testfile start of testfile
line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3
line 4 xxxAxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxAxxxxxxxxxxxxxxxxxxx line 4
line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5
line 6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxLINE 6, COL 19 line 6
line 7 xxxxxxxxxxBxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7
line 8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8
line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NO COLUMN SPECIFIEDxxxxxxxxxxx line 9
line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AGAIN NO COLUMNxxxxxxxxxxxxxxx line 10
line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx COL 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11
line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx COL 2xxxxxxxxxxxxxxxxxxxxxxxxx line 12
Cine 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13
line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxCOL 10xxxxxxxxxxxxxxxx line 14
line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xVCOL 10xxxxxxxxxxxxxxxxxxxxxx line 15
Dine 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ixxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16
line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx. SPACE POINTERxxxxxxxxxxx line 17
line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx. DOT POINTERxxxxxxxxxxxx line 18
Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx. DASH POINTERxxxxxxxxxx line 19
line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx. TAB-SPACE POINTERxxxx line 20
line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx xxxxxxxx:cf Xerrorfile1xxxxxxx line 21
line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx xxxxxxxx:cf Xerrorfile2xxxxxxx line 22
end of testfile end of testfile

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
538,
/**/ /**/
537, 537,
/**/ /**/