Mercurial > vim
comparison src/quickfix.c @ 20729:ada6f26e6eb1 v8.2.0917
patch 8.2.0917: quickfix entries do not suport a "note" type
Commit: https://github.com/vim/vim/commit/e928366de5deca359fad779a4f740db703296302
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 7 14:10:47 2020 +0200
patch 8.2.0917: quickfix entries do not suport a "note" type
Problem: Quickfix entries do not suport a "note" type.
Solution: Add support for "note". (partly by Yegappan Lakshmanan,
closes #5527, closes #6216)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Jun 2020 14:15:04 +0200 |
parents | d6827bd31d1d |
children | 68170c89e355 |
comparison
equal
deleted
inserted
replaced
20728:0775a4c140a9 | 20729:ada6f26e6eb1 |
---|---|
131 // 'X' leave directory | 131 // 'X' leave directory |
132 // 'A' start of multi-line message | 132 // 'A' start of multi-line message |
133 // 'E' error message | 133 // 'E' error message |
134 // 'W' warning message | 134 // 'W' warning message |
135 // 'I' informational message | 135 // 'I' informational message |
136 // 'N' note message | |
136 // 'C' continuation line | 137 // 'C' continuation line |
137 // 'Z' end of multi-line message | 138 // 'Z' end of multi-line message |
138 // 'G' general, unspecific message | 139 // 'G' general, unspecific message |
139 // 'P' push file (partial) message | 140 // 'P' push file (partial) message |
140 // 'Q' pop/quit file (partial) message | 141 // 'Q' pop/quit file (partial) message |
369 static char_u * | 370 static char_u * |
370 efm_analyze_prefix(char_u *efmp, efm_T *efminfo) | 371 efm_analyze_prefix(char_u *efmp, efm_T *efminfo) |
371 { | 372 { |
372 if (vim_strchr((char_u *)"+-", *efmp) != NULL) | 373 if (vim_strchr((char_u *)"+-", *efmp) != NULL) |
373 efminfo->flags = *efmp++; | 374 efminfo->flags = *efmp++; |
374 if (vim_strchr((char_u *)"DXAEWICZGOPQ", *efmp) != NULL) | 375 if (vim_strchr((char_u *)"DXAEWINCZGOPQ", *efmp) != NULL) |
375 efminfo->prefix = *efmp; | 376 efminfo->prefix = *efmp; |
376 else | 377 else |
377 { | 378 { |
378 semsg(_("E376: Invalid %%%c in format string prefix"), *efmp); | 379 semsg(_("E376: Invalid %%%c in format string prefix"), *efmp); |
379 return NULL; | 380 return NULL; |
1164 int midx; | 1165 int midx; |
1165 int status; | 1166 int status; |
1166 | 1167 |
1167 if ((idx == 'C' || idx == 'Z') && !qf_multiline) | 1168 if ((idx == 'C' || idx == 'Z') && !qf_multiline) |
1168 return QF_FAIL; | 1169 return QF_FAIL; |
1169 if (vim_strchr((char_u *)"EWI", idx) != NULL) | 1170 if (vim_strchr((char_u *)"EWIN", idx) != NULL) |
1170 fields->type = idx; | 1171 fields->type = idx; |
1171 else | 1172 else |
1172 fields->type = 0; | 1173 fields->type = 0; |
1173 | 1174 |
1174 // Extract error message data from matched line. | 1175 // Extract error message data from matched line. |
1437 { | 1438 { |
1438 // honor %> item | 1439 // honor %> item |
1439 if (fmt_ptr->conthere) | 1440 if (fmt_ptr->conthere) |
1440 fmt_start = fmt_ptr; | 1441 fmt_start = fmt_ptr; |
1441 | 1442 |
1442 if (vim_strchr((char_u *)"AEWI", idx) != NULL) | 1443 if (vim_strchr((char_u *)"AEWIN", idx) != NULL) |
1443 { | 1444 { |
1444 qfl->qf_multiline = TRUE; // start of a multi-line message | 1445 qfl->qf_multiline = TRUE; // start of a multi-line message |
1445 qfl->qf_multiignore = FALSE;// reset continuation | 1446 qfl->qf_multiignore = FALSE;// reset continuation |
1446 } | 1447 } |
1447 else if (vim_strchr((char_u *)"CZ", idx) != NULL) | 1448 else if (vim_strchr((char_u *)"CZ", idx) != NULL) |
3878 * Make a nice message out of the error character and the error number: | 3879 * Make a nice message out of the error character and the error number: |
3879 * char number message | 3880 * char number message |
3880 * e or E 0 " error" | 3881 * e or E 0 " error" |
3881 * w or W 0 " warning" | 3882 * w or W 0 " warning" |
3882 * i or I 0 " info" | 3883 * i or I 0 " info" |
3884 * n or N 0 " note" | |
3883 * 0 0 "" | 3885 * 0 0 "" |
3884 * other 0 " c" | 3886 * other 0 " c" |
3885 * e or E n " error n" | 3887 * e or E n " error n" |
3886 * w or W n " warning n" | 3888 * w or W n " warning n" |
3887 * i or I n " info n" | 3889 * i or I n " info n" |
3890 * n or N n " note n" | |
3888 * 0 n " error n" | 3891 * 0 n " error n" |
3889 * other n " c n" | 3892 * other n " c n" |
3890 * 1 x "" :helpgrep | 3893 * 1 x "" :helpgrep |
3891 */ | 3894 */ |
3892 static char_u * | 3895 static char_u * |
3898 | 3901 |
3899 if (c == 'W' || c == 'w') | 3902 if (c == 'W' || c == 'w') |
3900 p = (char_u *)" warning"; | 3903 p = (char_u *)" warning"; |
3901 else if (c == 'I' || c == 'i') | 3904 else if (c == 'I' || c == 'i') |
3902 p = (char_u *)" info"; | 3905 p = (char_u *)" info"; |
3906 else if (c == 'N' || c == 'n') | |
3907 p = (char_u *)" note"; | |
3903 else if (c == 'E' || c == 'e' || (c == 0 && nr > 0)) | 3908 else if (c == 'E' || c == 'e' || (c == 0 && nr > 0)) |
3904 p = (char_u *)" error"; | 3909 p = (char_u *)" error"; |
3905 else if (c == 0 || c == 1) | 3910 else if (c == 0 || c == 1) |
3906 p = (char_u *)""; | 3911 p = (char_u *)""; |
3907 else | 3912 else |