mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
37b755ab47
@ -549,7 +549,7 @@ static void cs_reading_emsg(
|
|||||||
static int cs_cnt_matches(size_t idx)
|
static int cs_cnt_matches(size_t idx)
|
||||||
{
|
{
|
||||||
char *stok;
|
char *stok;
|
||||||
int nlines;
|
int nlines = 0;
|
||||||
|
|
||||||
char *buf = xmalloc(CSREAD_BUFSIZE);
|
char *buf = xmalloc(CSREAD_BUFSIZE);
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
@ -569,16 +569,20 @@ static int cs_cnt_matches(size_t idx)
|
|||||||
return CSCOPE_FAILURE;
|
return CSCOPE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// If the database is out of date, or there's some other problem,
|
||||||
* If the database is out of date, or there's some other problem,
|
// cscope will output error messages before the number-of-lines output.
|
||||||
* cscope will output error messages before the number-of-lines output.
|
// Display/discard any output that doesn't match what we want.
|
||||||
* Display/discard any output that doesn't match what we want.
|
// Accept "\S*cscope: X lines", also matches "mlcscope".
|
||||||
* Accept "\S*cscope: X lines", also matches "mlcscope".
|
// Bail out for the "Unable to search" error.
|
||||||
*/
|
if (strstr((const char *)buf, "Unable to search database") != NULL) {
|
||||||
if ((stok = strtok(buf, (const char *)" ")) == NULL)
|
break;
|
||||||
|
}
|
||||||
|
if ((stok = strtok(buf, (const char *)" ")) == NULL) {
|
||||||
continue;
|
continue;
|
||||||
if (strstr((const char *)stok, "cscope:") == NULL)
|
}
|
||||||
|
if (strstr((const char *)stok, "cscope:") == NULL) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ((stok = strtok(NULL, (const char *)" ")) == NULL)
|
if ((stok = strtok(NULL, (const char *)" ")) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user