mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.0-021
This commit is contained in:
@@ -602,13 +602,19 @@ restofline:
|
|||||||
else
|
else
|
||||||
type = 0;
|
type = 0;
|
||||||
/*
|
/*
|
||||||
* Extract error message data from matched line
|
* Extract error message data from matched line.
|
||||||
|
* We check for an actual submatch, because "\[" and "\]" in
|
||||||
|
* the 'errorformat' may cause the wrong submatch to be used.
|
||||||
*/
|
*/
|
||||||
if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
|
if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
|
||||||
{
|
{
|
||||||
int c = *regmatch.endp[i];
|
int c;
|
||||||
|
|
||||||
|
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Expand ~/file and $HOME/file to full path. */
|
/* Expand ~/file and $HOME/file to full path. */
|
||||||
|
c = *regmatch.endp[i];
|
||||||
*regmatch.endp[i] = NUL;
|
*regmatch.endp[i] = NUL;
|
||||||
expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
|
expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
|
||||||
*regmatch.endp[i] = c;
|
*regmatch.endp[i] = c;
|
||||||
@@ -618,35 +624,63 @@ restofline:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
|
if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
|
||||||
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
enr = (int)atol((char *)regmatch.startp[i]);
|
enr = (int)atol((char *)regmatch.startp[i]);
|
||||||
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
|
if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
|
||||||
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
lnum = atol((char *)regmatch.startp[i]);
|
lnum = atol((char *)regmatch.startp[i]);
|
||||||
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
|
if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
|
||||||
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
col = (int)atol((char *)regmatch.startp[i]);
|
col = (int)atol((char *)regmatch.startp[i]);
|
||||||
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
|
if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
|
||||||
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
type = *regmatch.startp[i];
|
type = *regmatch.startp[i];
|
||||||
|
}
|
||||||
if (fmt_ptr->flags == '+' && !multiscan) /* %+ */
|
if (fmt_ptr->flags == '+' && !multiscan) /* %+ */
|
||||||
STRCPY(errmsg, IObuff);
|
STRCPY(errmsg, IObuff);
|
||||||
else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
|
else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
|
||||||
{
|
{
|
||||||
|
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
|
||||||
|
continue;
|
||||||
len = (int)(regmatch.endp[i] - regmatch.startp[i]);
|
len = (int)(regmatch.endp[i] - regmatch.startp[i]);
|
||||||
vim_strncpy(errmsg, regmatch.startp[i], len);
|
vim_strncpy(errmsg, regmatch.startp[i], len);
|
||||||
}
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
|
if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
|
||||||
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
tail = regmatch.startp[i];
|
tail = regmatch.startp[i];
|
||||||
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
|
if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
|
||||||
{
|
{
|
||||||
|
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
|
||||||
|
continue;
|
||||||
col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
|
col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
|
||||||
if (*((char_u *)regmatch.startp[i]) != TAB)
|
if (*((char_u *)regmatch.startp[i]) != TAB)
|
||||||
use_viscol = TRUE;
|
use_viscol = TRUE;
|
||||||
}
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
|
if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
|
||||||
{
|
{
|
||||||
|
if (regmatch.startp[i] == NULL)
|
||||||
|
continue;
|
||||||
col = (int)atol((char *)regmatch.startp[i]);
|
col = (int)atol((char *)regmatch.startp[i]);
|
||||||
use_viscol = TRUE;
|
use_viscol = TRUE;
|
||||||
}
|
}
|
||||||
if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
|
if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
|
||||||
{
|
{
|
||||||
|
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
|
||||||
|
continue;
|
||||||
len = (int)(regmatch.endp[i] - regmatch.startp[i]);
|
len = (int)(regmatch.endp[i] - regmatch.startp[i]);
|
||||||
if (len > CMDBUFFSIZE - 5)
|
if (len > CMDBUFFSIZE - 5)
|
||||||
len = CMDBUFFSIZE - 5;
|
len = CMDBUFFSIZE - 5;
|
||||||
|
@@ -666,6 +666,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 */
|
||||||
|
/**/
|
||||||
|
21,
|
||||||
/**/
|
/**/
|
||||||
20,
|
20,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user