• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision4ec4c53046b5be6700810b9b92996a0cfb4ed52a (tree)
Zeit2006-06-21 03:49:32
Autorvimboss
Commitervimboss

Log Message

updated for version 7.0-021

Ändern Zusammenfassung

Diff

diff -r edb3bc186e97 -r 4ec4c53046b5 src/quickfix.c
--- a/src/quickfix.c Tue Jun 20 18:39:51 2006 +0000
+++ b/src/quickfix.c Tue Jun 20 18:49:32 2006 +0000
@@ -602,13 +602,19 @@
602602 else
603603 type = 0;
604604 /*
605- * Extract error message data from matched line
605+ * Extract error message data from matched line.
606+ * We check for an actual submatch, because "\[" and "\]" in
607+ * the 'errorformat' may cause the wrong submatch to be used.
606608 */
607609 if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
608610 {
609- int c = *regmatch.endp[i];
611+ int c;
612+
613+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
614+ continue;
610615
611616 /* Expand ~/file and $HOME/file to full path. */
617+ c = *regmatch.endp[i];
612618 *regmatch.endp[i] = NUL;
613619 expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
614620 *regmatch.endp[i] = c;
@@ -618,35 +624,63 @@
618624 continue;
619625 }
620626 if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
627+ {
628+ if (regmatch.startp[i] == NULL)
629+ continue;
621630 enr = (int)atol((char *)regmatch.startp[i]);
631+ }
622632 if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
633+ {
634+ if (regmatch.startp[i] == NULL)
635+ continue;
623636 lnum = atol((char *)regmatch.startp[i]);
637+ }
624638 if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
639+ {
640+ if (regmatch.startp[i] == NULL)
641+ continue;
625642 col = (int)atol((char *)regmatch.startp[i]);
643+ }
626644 if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
645+ {
646+ if (regmatch.startp[i] == NULL)
647+ continue;
627648 type = *regmatch.startp[i];
649+ }
628650 if (fmt_ptr->flags == '+' && !multiscan) /* %+ */
629651 STRCPY(errmsg, IObuff);
630652 else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
631653 {
654+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
655+ continue;
632656 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
633657 vim_strncpy(errmsg, regmatch.startp[i], len);
634658 }
635659 if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
660+ {
661+ if (regmatch.startp[i] == NULL)
662+ continue;
636663 tail = regmatch.startp[i];
664+ }
637665 if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
638666 {
667+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
668+ continue;
639669 col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
640670 if (*((char_u *)regmatch.startp[i]) != TAB)
641671 use_viscol = TRUE;
642672 }
643673 if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
644674 {
675+ if (regmatch.startp[i] == NULL)
676+ continue;
645677 col = (int)atol((char *)regmatch.startp[i]);
646678 use_viscol = TRUE;
647679 }
648680 if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
649681 {
682+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
683+ continue;
650684 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
651685 if (len > CMDBUFFSIZE - 5)
652686 len = CMDBUFFSIZE - 5;
diff -r edb3bc186e97 -r 4ec4c53046b5 src/version.c
--- a/src/version.c Tue Jun 20 18:39:51 2006 +0000
+++ b/src/version.c Tue Jun 20 18:49:32 2006 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 21,
671+/**/
670672 20,
671673 /**/
672674 19,
Show on old repository browser